From: Shawn M Moore Date: Sat, 17 May 2008 09:24:41 +0000 (+0000) Subject: Revert fixing of empty for now X-Git-Tag: 0.18_01~38 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=facf217552443252a94872e1e75aafc292e6564d;p=gitmo%2FMooseX-AttributeHelpers.git Revert fixing of empty for now --- diff --git a/lib/MooseX/AttributeHelpers/MethodProvider/ImmutableHash.pm b/lib/MooseX/AttributeHelpers/MethodProvider/ImmutableHash.pm index b3825cc..1cf5123 100644 --- 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 --- 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 }; }