Re: [Catalyst] Plugin::Authentication apparently not reading config
Jason McIntosh wrote: As far as I can tell, the version numbers of all modules involved match. (Using latest CPAN or Debian versions of all modules.) Any advice as to where to look next would be enormously appreciated. My only real suggestion is to throw some dumping / debugging into the _authentication_initialize routine of Catalyst/Plugin/Authentication.pm to work out how/why it isn't finding your realms hash.. Also, does the config printed in the debug screen match what you expect for auth config, or does it look incorrect in any way? Cheers t0m ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Plugin::Authentication apparently not reading config
On Fri, Jun 5, 2009 at 6:56 AM, Tomas Doranbobtf...@bobtfish.net wrote: My only real suggestion is to throw some dumping / debugging into the _authentication_initialize routine of Catalyst/Plugin/Authentication.pm to work out how/why it isn't finding your realms hash.. Thank you, this was the nudge I needed. My problem was that the call to setup() had somehow wandered too high up in my application's main module code, so that it was getting called too early. No idea _how_ that happened, but it all makes sense from there. -- Jason McIntosh Appleseed Software Consulting http://appleseed-sc.com Email: j...@appleseed-sc.com Jabber: j...@appleseed-sc.com AIM:zendonut Cell: 617-792-3829 ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Plugin::Authentication apparently not reading config
Howdy all, I'm quite perplexed about some behavior from Plugin::Authentication. I'm trying to get a Catalyst app running on a new machine, but Authentication isn't reading any realms from my config. The config file is definitely getting read otherwise, and I can see my authentication realms definition sitting there in the Config session of Catalyst's in-browser error screen while I'm trying to debug this, but as far as I can tell the Auth module just isn't reading it. I'm debugging with this line: use Data::Dumper; die Dumper ( $c-auth_realms ); On the original machine, this prints a nice, full hashref containing all my realms info. On the new machine, this prints {}. So, the Authentication plugin is loading (and giving $c the auth_realms method), but it's not reading my config at all, apparently. This is the config I'm feeding it (exact same code in both machines): __PACKAGE__-config-{'Plugin::Authentication'} = { default_realm = 'members', members = { credential = { class = 'Password', password_field = 'password', password_type = 'clear', }, store = { class = 'DBIx::Class', user_class = 'NEADB::User', id_field = 'id', } } }; Even if I paste in the example config from Plugin::Authentication's man page, the return value of $c-auth_realms is still an empty hashref. As far as I can tell, the version numbers of all modules involved match. (Using latest CPAN or Debian versions of all modules.) Any advice as to where to look next would be enormously appreciated. -- Jason McIntosh Appleseed Software Consulting http://appleseed-sc.com Email: j...@appleseed-sc.com Jabber: j...@appleseed-sc.com AIM:zendonut Cell: 617-792-3829 ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/