So what would need to happen is that SiteConfig would have to export a "$c" that is appropriate for the current request (based on some way to determine which of four domains it's serving). That doesn't even seem possible (to export something different at run-time when it's loaded when mod_perl starts).Tied variables allow you to have things that appear to be variables but are in fact subroutines.
package SiteConfig; use strict; use base 'Exporter'; tie our $c, 'SiteConfig'; our @EXPORT_OK = qw($c); sub FETCH {{ dbname => 'somedb', dbserver => 'somehost', dbuser => 'someuser', dbpass => 'somepass', site_name => 'Some Plain Text Name', domain => 'some-domain.com', #... and a bunch more ... }}
In reply to Re^3: mod_perl and multiple installations of the same code
by nobull
in thread mod_perl and multiple installations of the same code
by saberworks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |