X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FRole%2FComposite.pm;h=18745d5ae44bfc3c43fe6b5ece4c0604b663c930;hp=0dfaad486670814fbe7a01f0454e24c8c73a36b1;hb=2053291d1c9bd8c8008259f872fbce78f97d040c;hpb=9b9e4b6566015d6d6e2aa6c745644174efa74623 diff --git a/lib/Mouse/Meta/Role/Composite.pm b/lib/Mouse/Meta/Role/Composite.pm index 0dfaad4..18745d5 100644 --- a/lib/Mouse/Meta/Role/Composite.pm +++ b/lib/Mouse/Meta/Role/Composite.pm @@ -50,7 +50,9 @@ sub has_override_method_modifier{ } sub add_attribute{ - my($self, $attr_name, $spec) = @_; + my $self = shift; + my $attr_name = shift; + my $spec = (@_ == 1 ? $_[0] : {@_}); my $existing = $self->{attributes}{$attr_name}; if($existing && $existing != $spec){ @@ -120,7 +122,7 @@ Mouse::Meta::Role::Composite - An object to represent the set of roles =head1 VERSION -This document describes Mouse version 0.39 +This document describes Mouse version 0.47 =head1 SEE ALSO