projects
/
gitmo/Mouse.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Use Mouse::Object::BUILDARGS, because it's safe and flexible.
[gitmo/Mouse.git]
/
lib
/
Mouse
/
Meta
/
Role
/
Composite.pm
diff --git
a/lib/Mouse/Meta/Role/Composite.pm
b/lib/Mouse/Meta/Role/Composite.pm
index
38b88a5
..
18745d5
100644
(file)
--- 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){