Yes that situation can occur when the two files are part of the same
package... despite having different file names mod_perl treats them as the
same since they have the same package name. This will give you the strange
behavior that you just described. Could this be your problem?
ryan
- Orig
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: <[EMAI
ing.
>
> i.e. this is a Perl quoting problem... not a DBI problem, and not
> a mod_perl problem.
>
> Stephen
>
> At 12:49 PM 9/1/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
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 '\
> > 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
> > d
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
whi
> 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 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 P
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 name