Parse:...straint(3pm)
β¨ Parse::Method::Signatures::TypeConstraint(3pm) β¨
okay bestie, so this is a page from the User Contributed Perl Documentation, and it's giving very specific niche utility and honestly? we're obsessed π
π NAME π
Parse::Method::Signatures::TypeConstraint β the little glow-up machine that turns parsed TC data into a Moose TC object π
πΈ DESCRIPTION πΈ
So basically, this is the class that takes your PPI elements and transforms them into Moose::Meta::TypeConstraint objects. It's the fairy godmother of type constraints, no cap π§β¨
π¦ ATTRIBUTES π¦
π tc
Lazy Build, periodt.
This is the Moose::Meta::TypeConstraint object for this type constraint β and it only gets built when someone actually asks for it. And when it does get built? tc_callback gets called for each individual component type, one at a time, in turn. Patient. Methodical. Iconic. π
π tc_callback
- Type: CodeRef
- Default:
find_registered_constraint
This is the callback that turns type names into type objects. If you want the full tea plus an actual example, go peek at type_constraint_callback in Parse::Method::Signatures. iykyk πβ¨
π from_namespace
- Type: ClassName
If you pass this in, then the default tc_callback will go searching for MooseX::Types in this package. She's thorough like that π΅οΈβοΈπ
π METHODS π
β find_registered_constraint
This one will search for an imported MooseX::Types inside from_namespace β but only if you actually provided one. If that doesn't pan out, she goes and asks the Moose::Meta::TypeConstraint::Registry for a type with the given name.
And if all of that fails? She just returns the type as a string, so that Moose's auto-vivification of classnames to type will work. Lowkey a fallback queen ππ
β to_string
String representation of the type constraint, approximately as parsed. Approximately! She's not doing a whole makeover, just showing you the vibe πΈ
π SEE ALSO π
Parse::Method::Signatures, MooseX::Types, MooseX::Types::Util.
π«Ά AUTHORS π«Ά
- Florian Ragwitz
<rafl@debian.org> - Ash Berlin
<ash@cpan.org>
π LICENSE π
Licensed under the same terms as Perl itself.
okay that's the whole page, you ate that, fr fr π β¨
and a lil sign-off for the road: this gem was documented with perl v5.34.0, dated 2022-06-16, and it lives under the name Parse:...straint(3pm). slay ππ¦π
π¦ where this page comes from
- debian bookworm: libparse-method-signatures-perl 1.003019-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libparse-method-signatures-perl 1.003019-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libparse-method-signatures-perl 1.003019-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libparse-method-signatures-perl 1.003019-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libparse-method-signatures-perl 1.003019-2 Β· 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