MouseX...:Moose(3pm)
π NAME π
MouseX::Types::Moose β it's MouseX::Types::Mouse bestie, but with drop-in compatibility with Any::Moose on top. That's the whole vibe. β¨
Like, if you've got old code that still says Any::Moose everywhere, this module has your back and doesn't make you rewrite your whole life. Slay. π
πΈ SYNOPSIS πΈ
okay so here's literally how you use it, no cap:
package Foo;
use Any::Moose;
use Any::Moose '::Types::Moose' => [qw( Int ArrayRef )];
has name => (
is => 'rw',
isa => Str;
);
has ids => (
is => 'rw',
isa => ArrayRef[Int],
);
1;
Look at that. You're pulling Any::Moose in, then asking it for '::Types::Moose' and handing it a list β Int and ArrayRef β and it just... gives you the types. π«Ά Then has does its thing, isa => Str for your name (yes bestie, exactly as written up there π), and ids gets ArrayRef[Int] because parameterized types are iconic and we love her. π
Then 1; at the end because Perl wants a true value and we respect Perl's needs. β
π¦ SEE ALSO π¦
- MouseX::Types::Mouse β the whole reason this module exists, go say hi π
k that's the page!! π written up for perl v5.34.0, dated 2022-06-16, and filed under the MouseX...:Moose(3pm) manual β mwah, go forth and type your attributes, bestie πβ¨π
π¦ where this page comes from
- debian bookworm: libmousex-types-perl 0.06-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmousex-types-perl 0.06-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmousex-types-perl 0.06-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmousex-types-perl 0.06-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmousex-types-perl 0.06-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms