On Thu, 11 Mar 2004, Perrin Harkins wrote:
Skylos was guessing you had closure problems from doing this. However, if these are always globals, you will not get closures from this. What you need to look for is some place where you are either using $dbstr and friends as lexicals (my $dbstr), or referring to a $dbh that was defined outside of the sub you're using it in, e.g.
my $dbh = DBI->connect($dbstr,$dbuser,$dbpass);
sub foo { my $x = $dbh->prepare.... }
He did say that, didn't he? That he has all sorts of subroutines and relies on these global variables to provide himself the connection.
Globals can't cause closures, only lexicals can. If things like $dbstr are always globals, then there's no problem. I didn't see anything in the example code that would create a closure.
- Perrin
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html