projects
/
gitmo/Moose.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
8fc3004
)
Hash accessor should accept more than 2 arguments
Dave Rolsky [Sat, 30 Oct 2010 15:05:23 +0000 (10:05 -0500)]
lib/Moose/Meta/Method/Accessor/Native/Hash/accessor.pm
patch
|
blob
|
blame
|
history
t/070_native_traits/050_trait_hash.t
patch
|
blob
|
blame
|
history
diff --git
a/lib/Moose/Meta/Method/Accessor/Native/Hash/accessor.pm
b/lib/Moose/Meta/Method/Accessor/Native/Hash/accessor.pm
index
e7348ab
..
7ebb001
100644
(file)
--- a/
lib/Moose/Meta/Method/Accessor/Native/Hash/accessor.pm
+++ b/
lib/Moose/Meta/Method/Accessor/Native/Hash/accessor.pm
@@
-75,7
+75,7
@@
sub _generate_method {
}
sub _minimum_arguments {1}
-sub _maximum_arguments {2}
+sub _maximum_arguments {undef}
no Moose::Role;
diff --git
a/t/070_native_traits/050_trait_hash.t
b/t/070_native_traits/050_trait_hash.t
index
107b851
..
b7bb837
100644
(file)
--- a/
t/070_native_traits/050_trait_hash.t
+++ b/
t/070_native_traits/050_trait_hash.t
@@
-176,7
+176,7
@@
sub run_tests {
'... returns what we expect'
);
- $obj->option_accessor( size => 42 );
+ $obj->option_accessor( size => 42, group => 10 );
like(
exception {
@@
-187,7
+187,7
@@
sub run_tests {
);
is_deeply(
- $obj->options, { quantity => 4, size => 42 },
+ $obj->options, { quantity => 4, size => 42, group => 10 },
'accessor as writer'
);