X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoo.pm;h=9d746e196ef9c495c7f7324db56b7bd3233126cc;hb=f2eac33e10951b37b5d3ec6b83d81c469fcf0289;hp=1f6300d100c71b657492dc5fa80f488ee09ed769;hpb=f6f646d5c651ac656b50fbd2c3d5e90c3a53c0e3;p=gitmo%2FMoo.git diff --git a/lib/Moo.pm b/lib/Moo.pm index 1f6300d..9d746e1 100644 --- a/lib/Moo.pm +++ b/lib/Moo.pm @@ -203,13 +203,12 @@ or =head2 BUILDARGS - around BUILDARGS => sub { - my $orig = shift; + sub BUILDARGS { my ( $class, @args ) = @_; unshift @args, "attr1" if @args % 2 == 1; - return $class->$orig(@args); + return { @args }; }; Foo::Bar->new( 3 ); @@ -478,7 +477,7 @@ No support for C, C, C, or C - override can be handled by around albeit with a little more typing, and the author considers augment to be a bad idea. -The C method is not provided by default. The author suggests loading +The C method is not provided by default. The author suggests loading L into C (via C for example) and using C<$obj-E$::Dwarn()> instead.