From: Graham Knop Date: Fri, 22 Feb 2013 09:59:21 +0000 (-0500) Subject: implementation of FOREIGNBUILDARGS X-Git-Tag: v1.001000~23 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e963cc9608140ae3ee8bfd419527dd25a8aa14e9;p=gitmo%2FMoo.git implementation of FOREIGNBUILDARGS --- diff --git a/lib/Moo.pm b/lib/Moo.pm index a6c6fc1..9ae0141 100644 --- a/lib/Moo.pm +++ b/lib/Moo.pm @@ -165,7 +165,7 @@ sub _constructor_maker_for { construction_string => ( $moo_constructor ? ($con ? $con->construction_string : undef) - : ('$class->'.$target.'::SUPER::new(@_)') + : ('$class->'.$target.'::SUPER::new($class->can(q[FOREIGNBUILDARGS]) ? $class->FOREIGNBUILDARGS(@_) : @_)') ), subconstructor_handler => ( ' if ($Moo::MAKERS{$class}) {'."\n"