If you make the following change (putting fetch into a package..)
fetch.lib.pl --
package fetch;
sub main { ... }
--
and then
fetch.pl --
require fetch.lib.pl;
foo::main();
--
This should solve your problem.
ryan
- Original Message -
From: Peter Pilsl [EMAIL PROTECTED]
To: [EMAIL
I have a query that executes many many times that I would like to optimize
using placeholders. One of the fields that it will insert into is a 'text'
field and I am having a problem with DBI (or the db) escaping '\n'
characters so when they are inserted into the database they become '\\n' (ie
a
/2001 -0500, ryc wrote:
I have a query that executes many many times that I would like to
optimize
using placeholders. One of the fields that it will insert into is a
'text'
field and I am having a problem with DBI (or the db) escaping '\n'
characters so when they are inserted into the database
I have two mod_perl programs on my site. One is in the directory inr2,
and the other is in the directory otherinr2.
These mod_perl programs have exactly the same code. Both of them do:
use cfg;
where cfg.pm is a file that's in both inr2 and otherinr2, but it's
different in these
Using 'my $variable_name' is kinda like a declaration of the variable that
tells perl the scope of the variable. So if you do my $var1 at the root
level of a file, the variable will be accessible throughout the entire
file.. or like in the problem you ran into, if you declare my $var2 inside a
On Wed, 1 Aug 2001, Kyle Dawkins wrote:
KD Definitely; sotred procedures are hit-and-miss in a lot of
KD environments. Remember that a large number of people in the
KD mod_perl world can't use 'em because they (we) use MySQL. If one
KD wanted to emulate this behaviour with MySQL, you would
You might want to try declaring the file handles as LOCAL *myfile or
whatever. You have to be very careful about making global variables with
modperl since they have the benfit of sticking around after the web
transaction is complete.
ryan
- Original Message -
From: John Buwa [EMAIL
I have a script that runs under modperl very well. It consists of one main
executable CGI file, and it 'requires' a few other pieces of source code.
One of the files it requires is called db.pl. This file creates a package,
and it contains several 'global' variables for that package (database