Subject: | check_user_roles and check_any_user_role return undef/empty list instead of false |
diff -u of the proposed patch attached
Subject: | Catalyst-Plugin-Authorization-Roles-check-bool-fix.patch |
--- /home/ahartmai/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Catalyst/Plugin/Authorization/Roles.pm 2009-11-19 21:20:31.000000000 +0100
+++ Roles.pm 2011-03-23 13:41:12.473514001 +0100
@@ -14,7 +14,7 @@
sub check_user_roles {
my ( $c, @roles ) = @_;
local $@;
- eval { $c->assert_user_roles(@roles) };
+ !!eval { $c->assert_user_roles(@roles) };
}
sub assert_user_roles {
@@ -71,7 +71,7 @@
sub check_any_user_role {
my ( $c, @roles ) = @_;
local $@;
- eval { $c->assert_any_user_role(@roles) };
+ !!eval { $c->assert_any_user_role(@roles) };
}
sub assert_any_user_role {