10 Jun
2002
10 Jun
'02
2:49 p.m.
I i'm right, every DB function begins by a $dbh=&C4Connect. Connecting to a DB is a HIGH time-cost function. The solution to this problem would be to have only one $dbh=&C4Connect at the beginning of every .pl script, this $dbh variable being used by every sub. One solution would be to rebuild all sub calls to add a dbh parameter, but i'm sure there is a solution to declare a global variable, which would be used if there is no "my $dbh" in the .pm sub... What's the best solution in Perl to do this ? ("our" may be used with packages, but what i want is to have the C4Connect at the beginning of every .pl script) -- Paul