I had a problem with Catalyst::Plugin::Authorization::Roles.

I'm not using the latest svn, but my version contains this:

sub check_user_roles {
    my $c = shift;
    local $@;
    eval { $c->assert_user_roles(@_) };
}

The role checking worked on my dapper box, but not on windows.
The windows machine used ActiveState and ppm.

The called code was doing this kind of thing:

        my $have = Set::Object->new( $user->roles() );
        my $need = Set::Object->new(@_);

        if ( $have->superset($need) ) {

The various Windows ppm versions of Set::Object were 1.14 or 1.08. 
Set::Object only supports a scalar in new from version 1.15 on.

So:

1. For a single user role, the code in the version I had was returning
a scalar, not an array.

2. The windows Set::Object was 1.14, which threw an exception.

3. The eval in check_user_roles was masking the Set::Object exception.

Hope this helps somebody
Jamie

_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to