[Koha-devel] about C4Connect
paul POULAIN
paul.poulain at free.fr
Mon Jun 10 13:49:03 CEST 2002
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
More information about the Koha-devel
mailing list