projects
/
gitmo/MooseX-AttributeHelpers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
6f60a71
)
The empty provided methods are returning the wrong values!
Shawn M Moore [Sat, 17 May 2008 09:23:15 +0000 (09:23 +0000)]
lib/MooseX/AttributeHelpers/MethodProvider/ImmutableHash.pm
patch
|
blob
|
blame
|
history
lib/MooseX/AttributeHelpers/MethodProvider/List.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/MooseX/AttributeHelpers/MethodProvider/ImmutableHash.pm
b/lib/MooseX/AttributeHelpers/MethodProvider/ImmutableHash.pm
index
1cf5123
..
b3825cc
100644
(file)
--- a/
lib/MooseX/AttributeHelpers/MethodProvider/ImmutableHash.pm
+++ b/
lib/MooseX/AttributeHelpers/MethodProvider/ImmutableHash.pm
@@
-48,7
+48,7
@@
sub count : method {
sub empty : method {
my ($attr, $reader, $writer) = @_;
- return sub { scalar CORE::keys %{$reader->($_[0])} ? 1 : 0 };
+ return sub { scalar CORE::keys %{$reader->($_[0])} ? 0 : 1 };
}
1;
diff --git
a/lib/MooseX/AttributeHelpers/MethodProvider/List.pm
b/lib/MooseX/AttributeHelpers/MethodProvider/List.pm
index
7e3c6cb
..
a47cbe2
100644
(file)
--- a/
lib/MooseX/AttributeHelpers/MethodProvider/List.pm
+++ b/
lib/MooseX/AttributeHelpers/MethodProvider/List.pm
@@
-14,7
+14,7
@@
sub count : method {
sub empty : method {
my ($attr, $reader, $writer) = @_;
return sub {
- scalar @{$reader->($_[0])} ? 1 : 0
+ scalar @{$reader->($_[0])} ? 0 : 1
};
}