diff options
-rw-r--r-- | lib/MooseX/NonMoose.pm | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/MooseX/NonMoose.pm b/lib/MooseX/NonMoose.pm index 62bf0d5..5f66ffe 100644 --- a/lib/MooseX/NonMoose.pm +++ b/lib/MooseX/NonMoose.pm @@ -59,6 +59,20 @@ about inlining, this is all you need to worry about. Applying L<MooseX::NonMoose::Meta::Role::Constructor> as well will provide an inlined constructor when you immutabilize your class. +MooseX::NonMoose provides a way to manipulate the argument list that gets +passed to the superclass constructor: FOREIGNBUILDARGS. This supports setting +attributes in the constructor for a subclass of a class whose constructor does +strict argument checking. + + sub FOREIGNBUILDARGS { + my $class = shift; + my %args = @_; + + # Returns a list that is appropriate for what you would + # use for arguments in the superclass constructor. + return massage_for_baseclass_args(%args); + } + =cut Moose::Exporter->setup_import_methods; @@ -80,10 +94,6 @@ sub init_meta { =over 4 -=item * Provide some way to manipulate the argument list that gets passed to the -superclass constructor, to support setting attributes in the constructor for a -subclass of a class whose constructor does strict argument checking. - =item * Allow for constructors with names other than C<new>. =back |