Search code examples
perlperl-modulecatalyst

"Can't use string ("Catalyst::Authentication::Store:"...) as a HASH ref while "strict refs"


i setup the Catalyst::Plugin::Authorization::Abilities module from this link:

[http://search.cpan.org/dist/Catalyst-Plugin-Authorization-Abilities/lib/Catalyst/Plugin/Authorization/Abilities.pm][1]

Bur when call this function:

$c->assert_user_ability('show_home_action');

I got this message prob:

Caught exception in OpConsole::Controller::Root->index "Can't use string ("Catalyst::Authentication::Store:"...) as a HASH ref while "strict refs" in use at accessor Catalyst::Authentication::Store::DBIx::Class::User::_user (defined at /root/perl5/lib/perl5/Catalyst/Authentication/Store/DBIx/Class/User.pm line 12) line 5."

i check few times my configuration and it seem to me that's all ok. but what's the prob :/


Solution

  • I found the prob, it was a wrong configuration in the database (in UserAction table i had wrong field name ("actio_id" => "action_id")). so every thx is ok now :p