From: semuel <se...@se...> - 2004-07-06 15:13:38
|
Hello There. If you are using Apache::DBI, then just be aware that it can handle only = two database handlers. And even that using some trick - normally it can = handle only one handler.=20 See Apache::DBI's documentation.=20 Semuel. -----Original Message----- From: mas...@li... [mailto:mas...@li...] On Behalf Of Justin = Hawkins Sent: Tuesday, July 06, 2004 2:44 AM To: mas...@li... Subject: [Mason] Using a handler to setup different globals for virtual sites Hi folks, I've got a bit of a problem that I beleive I can solve using a handler, currently I configure mason using httpd.conf directives. The problem is that I have several different mason apps running on one machine, but they all want globals with the same name. Preferbly, they'd be able to save that variable's reference over multiple requests as well (we are of course talking about a database handle here). My current approach is to change my apps, so one uses a global of '$fdbh', another uses '$dbh', and so on. This is kind of ugly. I'd like them to all be able to use $dbh, and get their own handle connected to their own database using it. I'll keep experimenting, but for now my question is fairly simple - is a line like: PerlSetVar MasonAllowGlobals $dbh in httpd.conf, equivalent to something like: package HTML::Mason::Commands; my $dbh; in handler.pl ?=20 Because I think it's not, at least the way I'm doing it :-) - Justin --=20 Justin Hawkins Email: ju...@in... (W) Systems Programmer Email: ju...@ha... (H) Internode Systems Pty Ltd Phone: +61-8-82282999 "Sometimes I can hardly see the mirrors for the smoke" ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 -=20 digital self defense, top technical experts, no vendor pitches,=20 unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Mason-users mailing list Mas...@li... https://lists.sourceforge.net/lists/listinfo/mason-users |