MooseX...orator(3pm)
π MooseX::Types::TypeDecorator
ok so bestie, welcome to the MooseX::Types::TypeDecorator page from the User Contributed Perl Documentation β yes that's the manual name, we're in perl land now πͺβ¨
πΈ VERSION
version 0.51 β that's the one, don't @ me.
π¦ DESCRIPTION
So basically, this is a decorator object that holds an underlying type constraint inside it. Like it's literally wearing the type constraint as an outfit π . We use it to control access to that type constraint and to sprinkle some extra features on top. Main character energy fr fr.
β¨ METHODS
This class defines the following methods, and yes we're going through all of them π
π new
Old school instantiation. That's it, that's the vibe. Classic, vintage, iconic.
π __type_constraint ($type_constraint)
Sets and/or gets the type_constraint. One method, two jobs, she's versatile like that π«Ά
π "isa"
This one handles $self->isa because AUTOLOAD literally can't β rip π. It tries both the type constraint, and for a class type, the class.
π can
Handles $self->can since AUTOLOAD can't. Same struggle, same solution. No cap.
β _throw_error
Properly delegates error messages. She's the messenger and she's not getting shot, ok? π
π§ DESTROY
We might need it later. That's the whole description. Leaving it there for future us π.
π₯ AUTOLOAD
Okay this is the big one. It delegates to the decorator target, unless this is a class type β in which case it will try to delegate to the type object first, then if that fails, try the class.
β οΈ Heads up: the method'new'is special cased to only be permitted on the class. So if there's no class, or the class doesn't provide anewmethod, an exception will be thrown. Periodt. Don't come for me when it throws.
π SUPPORT
Got beef? Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Types> β or you can email bug-MooseX-Types@rt.cpan.org π
There's also a mailing list for users of this distribution, hanging out at <http://lists.perl.org/list/moose.html>.
And there's an irc channel for users of this distribution too β #moose on irc.perl.org <irc://irc.perl.org/#moose>. Come say hi πΈ
π AUTHOR
Robert "phaylon" Sedlacek <rs@474.at> β a legend, we stan.
π COPYRIGHT AND LICENCE
This software is copyright (c) 2007 by Robert "phaylon" Sedlacek.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Free as in, go off bestie π¦
mkay that's the whole page!! this little writeup is perl v5.42.0, born 2025-07-25, and it's the MooseX::Types::TypeDecorator manual β catch you in the group chat πβ¨π«Ά
π¦ where this page comes from
- fedora 43: perl-MooseX-Types 0.51-2.fc43 Β· 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