[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-devel] about C4Connect
From: |
paul POULAIN |
Subject: |
[Koha-devel] about C4Connect |
Date: |
Mon Jun 10 13:49:03 2002 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc2) Gecko/20020510 |
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
- [Koha-devel] about C4Connect,
paul POULAIN <=