Code Comments
Programming Forum and web based access to our favorite programming groups.I get variable error when I try to use procedure in a module to connect to
db.
=== common.pm
sub connect
{
return DBI->connect( "DBI:mysql:blogbase:localhost", "something",
"something" ) or croak "MySQL seems to be down.";
}
== index.pl
use common;
#...
$db = Common::connect() or croak "woops";
If I access it on my testbox running apache without mod_perl, it works.
If I type perl index.pl in console on the working server, it works.
When I try to access it on the server, with apache with mod_perl, it croaks.
What's the problem? How do I fix it? I seem to be pretty much out of any
clue...
I was also wondering if there's something like "HOWTO migrate to mod_perl"
guide somewhere.
Post Follow-up to this messageSergei Shelukhin wrote: > I was also wondering if there's something like "HOWTO migrate to > mod_perl" guide somewhere. There is: http://perl.apache.org/docs/1.0/guide/porting.html -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.