Re: [Catalyst] Configuration process
Why don't you just use the standard yml config file? On Thu, Jul 2, 2009 at 1:00 PM, Frederic Demiansfrede...@demians.fr wrote: Hello, It must be a newbie question... I have a simple application, let say MyApp. In lib/MyApp.pm, I ask for standard config loading with: Catalyst qw/ ConfigLoader / I want to add config variables from another source than myapp.conf. But in order to construct those variables I need to access configuration variables loaded by ConfigLoader. But those variables are not yet loaded when I access them: myapp.conf contains: filepath /path/to/config.xml And in MyApp.pm, I have: __PACKAGE__-config( speciolconf = XMLin( __PACKAGE-config-{filepath} ); This issue is that __PACKAGE-config-{filepath} is not initialized. How can I do? Thanks. -- Frédéric ___ 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/ ___ 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] Configuration process
From: Alejandro Imass alejandro.im...@gmail.com Why don't you just use the standard yml config file? If I remember well, the recommended configuration file type is .conf (Config::General) and not .yaml. Isn't it true? 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/
Re: [Catalyst] Configuration process
You are right and this is something new. I've only ported my apps to new cat releases but haven't started one from scratch in a while. I just tested, and sure enough, it creates a .conf file instead of the traditional yaml file, although it says: # rename this file to test.yml and put a : in front of name if # you want to use yaml like in old versions of Catalyst Guess I have to catchup to all these changes... :( On Fri, Jul 3, 2009 at 2:47 PM, Octavian Râsnitaorasn...@gmail.com wrote: From: Alejandro Imass alejandro.im...@gmail.com Why don't you just use the standard yml config file? If I remember well, the recommended configuration file type is .conf (Config::General) and not .yaml. Isn't it true? 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/ ___ 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] Configuration process
On 3 Jul 2009, at 15:36, Alejandro Imass wrote: You are right and this is something new. I've only ported my apps to new cat releases but haven't started one from scratch in a while. I just tested, and sure enough, it creates a .conf file instead of the traditional yaml file, although it says: # rename this file to test.yml and put a : in front of name if # you want to use yaml like in old versions of Catalyst Guess I have to catchup to all these changes... :( Don't worry. A lot of people still use YAML in preference to Config::General style .conf. Both are still fully supported. The main reason that the default for generated apps was changed is that it's _FAR TOO EAY_ for a newbie to mess up the whitespace in YAML (especially when copying it out of POD sections). This caused a large amount of confusion for people new to the framework, therefore we changed to Config::General as it doesn't have those drawbacks. I still exclusively use YAML in my apps (as it's what I'm used to, and what all of work's none Catalyst stuff already used). 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] Configuration process
Ok! Good to hear, I honestly prefer YAML/JSON for human-readable serialization any day. I just skipped through the Config::General POD and I think I'd rather write my configs in terse Dumper than learn this yaml (pun intended) lol On Fri, Jul 3, 2009 at 5:33 PM, Tomas Doranbobtf...@bobtfish.net wrote: On 3 Jul 2009, at 15:36, Alejandro Imass wrote: You are right and this is something new. I've only ported my apps to new cat releases but haven't started one from scratch in a while. I just tested, and sure enough, it creates a .conf file instead of the traditional yaml file, although it says: # rename this file to test.yml and put a : in front of name if # you want to use yaml like in old versions of Catalyst Guess I have to catchup to all these changes... :( Don't worry. A lot of people still use YAML in preference to Config::General style .conf. Both are still fully supported. The main reason that the default for generated apps was changed is that it's _FAR TOO EAY_ for a newbie to mess up the whitespace in YAML (especially when copying it out of POD sections). This caused a large amount of confusion for people new to the framework, therefore we changed to Config::General as it doesn't have those drawbacks. I still exclusively use YAML in my apps (as it's what I'm used to, and what all of work's none Catalyst stuff already used). 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/ ___ 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] Configuration process
Hello, It must be a newbie question... I have a simple application, let say MyApp. In lib/MyApp.pm, I ask for standard config loading with: Catalyst qw/ ConfigLoader / I want to add config variables from another source than myapp.conf. But in order to construct those variables I need to access configuration variables loaded by ConfigLoader. But those variables are not yet loaded when I access them: myapp.conf contains: filepath /path/to/config.xml And in MyApp.pm, I have: __PACKAGE__-config( speciolconf = XMLin( __PACKAGE-config-{filepath} ); This issue is that __PACKAGE-config-{filepath} is not initialized. How can I do? Thanks. -- Frédéric ___ 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/