MooseX...rizable(3pm)
π NAME π
okay bestie, welcome to the MooseX...rizable(3pm) page from the User Contributed Perl Documentation collection. The main character is MooseX::Role::Parameterized::Meta::Trait::Parameterizable, and itβs a trait for parameterizable roles. periodt. π
β¨ VERSION β¨
version 1.11, no cap. π
πΈ DESCRIPTION πΈ
okay so this is the trait that gets applied to the metaclass for parameterizable roles β roles that have their parameters currently unbound. These are the roles you use with in Moose, but instead of composing the parameterizable role, we construct a new parameterized role (MooseX::Role::Parameterized::Meta::Role::Parameterized) and use that new parameterized role instead. literally the whole plot twist. π¦
π ATTRIBUTES π
parameterized_role_metaclass
The name of the class that will be used to construct the parameterized role. slay. π
parameters_class
The name of the class that will be used to construct the parameters object. cute. π
parameters_metaclass
A metaclass representing this roleβs parameters. It will be an anonymous subclass of parameters_class. Each call to parameter in MooseX::Role::Parameters adds an attribute to this metaclass.
When this role is consumed, the parameters object will be instantiated using this metaclass. so itβs giving factory energy. π§
role_generator
A code reference that is used to generate a role based on the parameters provided by the consumer. The user usually specifies it using the role in MooseX::Role::Parameterized keyword. obsessed. π
π¦ METHODS π¦
add_parameter $name, %options
Delegates to add_attribute in Moose::Meta::Class on the parameters_metaclass object. easy. β¨
construct_parameters %arguments
Creates a new MooseX::Role::Parameterized::Parameters object using metaclass parameters_metaclass.
The arguments are those specified by the consumer as parameter values. iykyk. π«
generate_role %arguments
This method generates and returns a new instance of parameterized_role_metaclass. It can take any combination of three named arguments:
parameters
A hashref of parameters for the role, same as would be passed in at a with statement.
package
A package name that, if present, we will use for the generated role; if not, we generate an anonymous role.
consumer
A consumer metaobject, if available.
no cap, thatβs the trio. π«Ά
apply
Overrides apply in Moose::Meta::Role to automatically generate the parameterized role. main character energy. π
π SUPPORT π
Bugs may be submitted through the RT bug tracker at <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Role-Parameterized> (or bug-MooseX-Role-Parameterized@rt.cpan.org <mailto:bug-MooseX-Role-Parameterized@rt.cpan.org>). π but like, in a helpful way.
There is also a mailing list available for users of this distribution, at <http://lists.perl.org/list/moose.html>. π
There is also an irc channel available for users of this distribution, at #moose on irc.perl.org <irc://irc.perl.org/#moose>. come hang. πΈ
π AUTHOR π
Shawn M Moore <code@sartak.org> β iconic. π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2008 by Shawn M Moore.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
literally free software, bestie β go off. π
okay thatβs the whole page, bestie π«Ά this was MooseX...rizable(3pm) from perl v5.42.0, dated 2019-07-16. now go be iconic with your parameterizable roles πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-MooseX-Role-Parameterized 1.11-bp160.1.11 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms