projects
/
gitmo/MooseX-AttributeHelpers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
99c62fb
)
Fixed delete() to behave correctly with multiple key arguments.
Paul Driver [Thu, 20 Mar 2008 21:33:59 +0000 (21:33 +0000)]
lib/MooseX/AttributeHelpers/MethodProvider/Hash.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/MooseX/AttributeHelpers/MethodProvider/Hash.pm
b/lib/MooseX/AttributeHelpers/MethodProvider/Hash.pm
index
ec8dac5
..
6e08454
100644
(file)
--- a/
lib/MooseX/AttributeHelpers/MethodProvider/Hash.pm
+++ b/
lib/MooseX/AttributeHelpers/MethodProvider/Hash.pm
@@
-56,7
+56,10
@@
sub clear : method {
sub delete : method {
my ($attr, $reader, $writer) = @_;
- return sub { CORE::delete $reader->($_[0])->{$_[1]} };
+ return sub {
+ my $hashref = $reader->(shift);
+ CORE::delete @{$hashref}{@_};
+ };
}
1;