From a2f4b842a0cd91625e3359e5b9e54a5b372d7ffa Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 6 May 2009 17:36:33 -0500 Subject: clean up the FOREIGNBUILDARGS documentation --- lib/MooseX/NonMoose.pm | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'lib') diff --git a/lib/MooseX/NonMoose.pm b/lib/MooseX/NonMoose.pm index 4bea095..c36d3ca 100644 --- a/lib/MooseX/NonMoose.pm +++ b/lib/MooseX/NonMoose.pm @@ -59,19 +59,12 @@ about inlining, this is all you need to worry about. Applying L 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); - } +C allows you to manipulate the argument list that gets passed +to the superclass constructor by defining a C method. This is +called with the same argument list as the C method, but should +return a list of arguments to pass to the superclass constructor. This allows +C to support superclasses whose constructors would get +confused by the extra arguments that Moose requires (for attributes, etc.) =cut -- cgit v1.2.3