Jaap has asked for the wisdom of the Perl Monks concerning the following question:
with module#!/cadappl/bin/perl -IDoc -Ilib use Doc::DBI; #inherits from Class::DBI
Works fine on the command line and as cgi. Now i am trying to make it work under mod_perl. Trying use lib on the command-line fails, with this error:package Doc::DBI; use base 'Class::DBI'; Doc::DBI->connection('DBI:mysql:database=abcdefg;host=host.tld', 'user +', 'passwd'); 1;
I assume use lib loads the module at another time than -I but why won't it work?Can't locate object method "connection" via package "Doc::DBI" (perhap +s you forgot to load "Doc::DBI"?) at /home/hive/25167/perl/Doc/DBI.pm + line 5. Compilation failed in require at /home/hive/25167/cgi-bin/productie/li +b/Ima/DBI.pm line 7. ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 'use lib' versus '-I'
by hardburn (Abbot) on Nov 30, 2004 at 15:36 UTC | |
by Jaap (Curate) on Nov 30, 2004 at 15:40 UTC | |
by hardburn (Abbot) on Nov 30, 2004 at 15:50 UTC | |
|
Re: 'use lib' versus '-I'
by ikegami (Patriarch) on Nov 30, 2004 at 18:16 UTC | |
|
Re: 'use lib' versus '-I'
by htoug (Deacon) on Nov 30, 2004 at 18:05 UTC | |
|
Re: 'use lib' versus '-I'
by Steve_p (Priest) on Nov 30, 2004 at 21:34 UTC |