Stuart Watt wrote:
I did a simple tweak to the configuration file management so environment
variables could be substituted into configuration files. All I added to
MyApp.pm was:
<snip>
Then, I could use YAML settings like:
session:
storage: '__ENV(TEMP)__/sessions'
It was pretty easy for us to get web servers to set environment
variables, so this trick allowed us to have multiple systems with
different database and file directories set pretty straightforwardly.
That's a nice trick, it would be great to see it documented. Do you
fancy writing up a wiki page, or adding something to the manual, or even
patching ConfigLoader so that it supports a syntax like this by default?
This may be one approach you could use, but there are likely better
ones. Especially since I'm still stuck at 5.70 waiting for a good
opportunity to upgrade without anyone (even my colleagues) noticing.
This is a 5.70 solution, but should be OK in 5.80, I would guess.
Yes, that'll work in 5.80, but still won't solve the issue at hand.
If you try to run multiple copies of the same application in the same
perl process, it won't work like you expect - the setting will come from
the first application loaded..
Your solution just makes it much easier to have multiple deployment
environments with different configurations, but these environments still
have to have a different perl interpreter each.
Cheers
t0m
_______________________________________________
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/