Re: [Catalyst] Catalyst tutorial
Am 19.07.2009 um 13:28 schrieb Octavian Râşniţă: In Catalyst::Manual::Tutorial::04_BasicCRUD.pod I read that we need to specify the ResultSet classes we want to use with: __PACKAGE__->resultset_class('MyApp::Schema::ResultSet::Book'); I've seen that it works even without it. Is this line really needed? This works because you are using load_namespace in your schema definition. But there are components around which set the resultset class to a different one. Thus you might need to set the resultset class explicitly. moritz ___ 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] Catalyst tutorial
In Catalyst::Manual::Tutorial::04_BasicCRUD.pod I read that we need to specify the ResultSet classes we want to use with: __PACKAGE__->resultset_class('MyApp::Schema::ResultSet::Book'); I've seen that it works even without it. Is this line really needed? Octavian ___ 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] catalyst tutorial sample question about authorization
I'm reading the tutorial chapter 5 : Authorization I add some like this : [% IF Catalyst.check_user_roles('user') %] Logout [% END %] [% IF Catalyst.check_user_roles('admin') %] Create [% END %] and then login in a user who has "user" role but no "admin" role, it shows some error on browser: Here's the error message, on the off-chance that it means something to you: undef error - check_user_roles is undefined. if I use another user (admin & user role) to login, it's ok. why? ___ 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/