Skip Menu |

This queue is for tickets about the Catalyst-Plugin-Authorization-Roles CPAN distribution.

Report information
The Basics
Id: 66812
Status: resolved
Priority: 0/
Queue: Catalyst-Plugin-Authorization-Roles

People
Owner: bobtfish [...] bobtfish.net
Requestors: abraxxa [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.08
Fixed in: (no value)



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 {
Fixed in the latest release. Thanks for the bug report and patch!