projects
/
gitmo/MooseX-AttributeHelpers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
d28623a
)
Revert fixing of empty for now
Shawn M Moore [Sat, 17 May 2008 09:24:41 +0000 (09:24 +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
b3825cc
..
1cf5123
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])} ? 0 : 1 };
+ return sub { scalar CORE::keys %{$reader->($_[0])} ? 1 : 0 };
}
1;
diff --git
a/lib/MooseX/AttributeHelpers/MethodProvider/List.pm
b/lib/MooseX/AttributeHelpers/MethodProvider/List.pm
index
a47cbe2
..
b34fba2
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])} ? 0 : 1
+ scalar @{$reader->($_[0])} ? 1 : 0
};
}