MooX::TypeTiny(3)
π NAME π
MooX::TypeTiny β optimized type checks for Moo + Type::Tiny. Basically it's the glow-up your isa checks have been begging for π
(and yeah, this is from the User Contributed Perl Documentation, in case you were wondering π«Ά)
β¨ SYNOPSIS β¨
Okay so picture this β you're writing a class, you've got types, and you want it all to slay:
package Some::Moo::Class;
use Moo;
use MooX::TypeTiny;
use Types::Standard qw(Int);
has attr1 => (is => 'ro', isa => Int);
That's it. That's the whole vibe. You just use it and it does the thing π§
π¦ DESCRIPTION π¦
So here's the tea, bestie: this module optimizes Moo type checks when you're using them with Type::Tiny, so they perform way better. No cap. π₯
It'll automatically apply itself to isa checks and coercions that use Type::Tiny. And any isa checks that are not from Type::Tiny? Those still work exactly like normal. Everyone's invited to the party π
How does it do it? It inlines the type check in a more optimal way that's specific to Type::Tiny, rather than using the general mechanism Moo usually reaches for. Tailored. Bespoke. Iconic. π
With this module, setters that have type checks should be as fast as an equivalent check in Moose. Literally the speed you deserve β¨
And the hope? That eventually this type inlining will just happen automatically, which would make this module unnecessary. Until then, we stan MooX::TypeTiny π
πΈ AUTHOR πΈ
haarg β Graham Knop (cpan:HAARG) <haarg@haarg.org> π«Ά
π CONTRIBUTORS π
None so far. The way this list is empty π (there's room for you though, just saying π)
π COPYRIGHT π
Copyright (c) 2015 the MooX::TypeTiny "AUTHOR" and "CONTRIBUTORS" as listed above. Keeping it legal, keeping it cute π
π LICENSE π
This library is free software and may be distributed under the same terms as perl itself. Go check it out: <http://dev.perl.org/licenses/> π¦
β¨ And that's the whole page, bestie! Brought to you byperl v5.40.0, fresh from2024-08-06β go forth and type-check your little heart out πππ
π¦ where this page comes from
- epel 10: perl-MooX-TypeTiny 0.002003-11.el10_0 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms