On Mon, Feb 3, 2014 at 5:33 PM, Chris Bennett
<ch...@bennettconstruction.us> wrote:
> Right now I am using pg_1_.pl and pg_2.pl on the different hosts, but
> the code is identical, except that some data is pulled in from a config
> file for the different databases, etc used.
>
> Can I safely use pg.pl on both VirtualHosts or do I need to do something
> else also to do this?

I'm sure that you can use the same code, but the question is how do
you know which data to pull in and how do you store it in perl data
structures?  One common approach in this situation is to use
PerlSetVar inside your virtualhost config to set something you can
read from perl that will tell you which virtualhost you're in.  Then
you can use that as a key into a data structure or for triggering
conditional behavior.

- Perrin

Reply via email to