require v.s. do in modperl

2001-08-01 Thread Philip Mak
I have a CGI application where I do: require 'db.pl'; where db.pl defines some functions and variables related to connecting to the database, and then executes C$dbh = DBI-connect(...). I tried to convert this application to modperl, but I ran into the problem that require did not execute

Re: require v.s. do in modperl

2001-08-01 Thread Perrin Harkins
I have a CGI application where I do: require 'db.pl'; where db.pl defines some functions and variables related to connecting to the database, and then executes C$dbh = DBI-connect(...). snip I can get around this by changing Crequire to Cdo, but is that the correct way of doing things?

Re: require v.s. do in modperl

2001-08-01 Thread Gunther Birznieks
For what you are trying to do, you should turn it into a module. Sorry for the short post, I've gotta split... Although it's not user friendly, my more constructive hint is to type perldoc perlmod to get a quick tutorial on writing a module. At 06:56 PM 8/1/2001 -0400, Philip Mak wrote: I

Re: require v.s. do in modperl

2001-08-01 Thread Gunther Birznieks
At 07:16 PM 8/1/2001 -0400, Perrin Harkins wrote: I have a CGI application where I do: require 'db.pl'; where db.pl defines some functions and variables related to connecting to the database, and then executes C$dbh = DBI-connect(...). snip I can get around this by changing

Re: require v.s. do in modperl

2001-08-01 Thread Nick Tonkin
On Wed, 1 Aug 2001, Philip Mak wrote: I have a CGI application where I do: require 'db.pl'; where db.pl defines some functions and variables related to connecting to the database, and then executes C$dbh = DBI-connect(...). I tried to convert this application to modperl, but I ran

Re: require v.s. do in modperl

2001-08-01 Thread Gunther Birznieks
At 07:18 PM 8/1/2001 -0700, Nick Tonkin wrote: On Wed, 1 Aug 2001, Philip Mak wrote: I have a CGI application where I do: require 'db.pl'; where db.pl defines some functions and variables related to connecting to the database, and then executes C$dbh = DBI-connect(...). I tried

Re: require v.s. do in modperl

2001-08-01 Thread Perrin Harkins
Gunther Birznieks wrote: At 07:16 PM 8/1/2001 -0400, Perrin Harkins wrote: I have a CGI application where I do: require 'db.pl'; where db.pl defines some functions and variables related to connecting to the database, and then executes C$dbh = DBI-connect(...). snip I