diff options
Diffstat (limited to 'lib/MooseX/NonMoose.pm')
-rw-r--r-- | lib/MooseX/NonMoose.pm | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/lib/MooseX/NonMoose.pm b/lib/MooseX/NonMoose.pm index 0fd9282..5a989e0 100644 --- a/lib/MooseX/NonMoose.pm +++ b/lib/MooseX/NonMoose.pm @@ -62,6 +62,15 @@ return a list of arguments to pass to the superclass constructor. This allows C<MooseX::NonMoose> to support superclasses whose constructors would get confused by the extra arguments that Moose requires (for attributes, etc.) +Not all non-Moose classes use C<new> as the name of their constructor. This +module allows you to extend these classes by explicitly stating which method is +the constructor, during the call to C<extends>. The syntax looks like this: + + extends 'Foo' => { -constructor_name => 'create' }; + +similar to how you can already pass C<-version> in the C<extends> call in a +similar way. + =cut my ($import, $unimport, $init_meta) = Moose::Exporter->build_import_methods( @@ -81,14 +90,6 @@ sub init_meta { $package->$init_meta(@_); } -=head1 TODO - -=over 4 - -=item * Allow for constructors with names other than C<new>. - -=back - =head1 BUGS/CAVEATS =over 4 @@ -111,10 +112,6 @@ C<MooseX::NonMoose> (i.e. using C<sub new { ... }>) currently doesn't work, although using method modifiers on the constructor should work identically to normal Moose classes. -=item * C<MooseX::NonMoose> currently assumes in several places that the -superclass constructor will be called C<new>. This may be made configurable -in the future. - =back Please report any bugs through RT: email @@ -125,7 +122,7 @@ L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MooseX-NonMoose>. =over 4 -=item * L<Moose::Cookbook::FAQ/How do I make non-Moose constructors work with Moose?> +=item * L<Moose::Manual::FAQ/How do I make non-Moose constructors work with Moose?> =item * L<MooseX::Alien> |