in reply to mod_perl and Global Variables

What happens if you use a global hash. Would Apache::DBI cache the hash and allow multiple persisitant connections between different servers since the cached handle is bassed on the connect string.
i.e.
use strict; use DBI; use vars qw( %conn ); sub connect { reread_conf("./config"); my $server = $config->{server}; my $db = $config->{db}; $conn{$db} ||= DBI->connect("dbi:$server:$db", ...); } my $dbh = connect();
Where reread_conf has the config hash for that app. Would this work? I haven't tested it myself and would be interested to know.