diff options
author | Jason May <jason.a.may@gmail.com> | 2009-05-06 13:35:18 -0400 |
---|---|---|
committer | Jason May <jason.a.may@gmail.com> | 2009-05-06 13:35:18 -0400 |
commit | 9383dbbb73b64be0254a4b59a1bb61fb7fc783b7 (patch) | |
tree | cf0e495ab3958808af430f16f93c38a64a753f3f | |
parent | e55c6cbca9cc0c352272e592e504fc5abbfb800b (diff) | |
download | moosex-nonmoose-9383dbbb73b64be0254a4b59a1bb61fb7fc783b7.tar.gz moosex-nonmoose-9383dbbb73b64be0254a4b59a1bb61fb7fc783b7.zip |
provide doc for FOREIGNBUILDARGS
-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 |