projects
/
gitmo/Moose.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
43131ee
)
Revert "Hash accessor should accept more than 2 arguments"
Dave Rolsky [Sat, 30 Oct 2010 15:07:06 +0000 (10:07 -0500)]
This reverts commit
43131ee20ae3d0f9f941ff9c1826cd721449cb3a
.
Doh, the method is documented as accepting just two arguments.
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
7ebb001
..
e7348ab
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 {undef}
+sub _maximum_arguments {2}
no Moose::Role;
diff --git
a/t/070_native_traits/050_trait_hash.t
b/t/070_native_traits/050_trait_hash.t
index
b7bb837
..
107b851
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, group => 10 );
+ $obj->option_accessor( size => 42 );
like(
exception {
@@
-187,7
+187,7
@@
sub run_tests {
);
is_deeply(
- $obj->options, { quantity => 4, size => 42, group => 10 },
+ $obj->options, { quantity => 4, size => 42 },
'accessor as writer'
);