<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
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:<br>
<br>
<tt>__PACKAGE__-&gt;config('Plugin::ConfigLoader' =&gt; <br>
    {    file =&gt; 'MyApp.yaml',<br>
         substitutions =&gt; {<br>
            ENV =&gt; sub { <br>
                my ($c, $v) = @_; <br>
                if (! defined($ENV{$v})) {<br>
                    die("Missing environment variable: $v");<br>
                } else {<br>
                    return $ENV{$v}; <br>
                }<br>
            }<br>
         }<br>
    } <br>
);</tt><br>
<br>
Then, I could use YAML settings like:<br>
<br>
<tt>session:<br>
  storage:       '__ENV(TEMP)__/sessions'<br>
</tt><br>
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.<br>
<br>
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. <br>
<br>
All the best<br>
Stuart<br>
<br>
<br>
Stephen Clouse wrote:
<blockquote
 cite="mid:5d0ee2170905271012w354cc415x75d51fa392579df2@mail.gmail.com"
 type="cite">Hello all,<br>
  <br>
I am fairly new to Catalyst and am currently evaluating it for use on
several projects, a couple of them being conversions of an existing
system to use Catalyst instead of the hacked-together in-house
framework currently in use.  Those apps have the old
per-customer/mass-blog-hosting model going -- the exact same app
deployed with different database/filesystem path configurations
(currently set using mod_perl configuration directives inside
&lt;VirtualHost&gt; sections in Apache config), previously accomplished
with Catalyst either with FastCGI deployment or ACCEPT_CONTEXT magic
that I don't quite understand yet.<br>
  <br>
I have seen hints dropped in places such as <a moz-do-not-send="true"
 href="http://osdir.com/ml/lang.perl.modules.dbix-class/2006-08/msg00188.html">http://osdir.com/ml/lang.perl.modules.dbix-class/2006-08/msg00188.html</a>
that Catalyst 5.80 has gained more explicit support for such a
deployment model under mod_perl, but so far I have come up empty on
finding references or examples of how to actually do it.<br>
  <br>
  <span class="gI"></span>Some guidance would be greatly appreciated.<br
 clear="all">
  <br>
-- <br>
Stephen Clouse &lt;<a moz-do-not-send="true"
 href="mailto:stephenclouse@gmail.com">stephenclouse@gmail.com</a>&gt;<br>
  <br>
--
  <br>
This message was scanned by ESVA and is believed to be clean.
  <br>
  <a moz-do-not-send="true"
 href="http://antispam.infobal.com/cgi-bin/learn-msg.cgi?id=64AE2280C1.6F32B">Click
here to report this message as spam.</a>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
List: <a class="moz-txt-link-abbreviated" href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a>
Listinfo: <a class="moz-txt-link-freetext" href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a>
Searchable archive: <a class="moz-txt-link-freetext" href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a>
Dev site: <a class="moz-txt-link-freetext" href="http://dev.catalyst.perl.org/">http://dev.catalyst.perl.org/</a>
  </pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<span style="color: rgb(102, 0, 0);">Stuart Watt<br>
ARM Product Developer<br>
Information Balance</span></div>
</body>
</html>