On 08/06/12 19:05, Luis Muñoz wrote:

But still, I would like to have access to the configuration data (for instance, 
how to setup the database/ldap/whatever Model, etc). Does that happen as well 
when using the class method?


As W. Tyler Gee stated, you appear to have fallen into the trap of assuming that Catalyst owns your application configuration, and that you therefore have to access it via the Catalyst context object. Catalyst makes it easy to access the application configuration from within Catalyst, which is perhaps why this trap can sneak up on you.

Dave Rolsky wrote an interesting blog article about how he uses Catalyst, and in it, he talks about the use of configuration data:

http://blog.urth.org/2009/08/how-i-use-catalyst.html

The R2 project to which he refers is available on GitHub:

https://github.com/autarch/R2

If you look at lib/R2.pm, you'll see that it pulls configuration data in from R2::Config - an application config module. I found looking through the R2 code very informative.


Regards,

Mike

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

Reply via email to