Return-Path: Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 59256 invoked by uid 500); 7 May 2003 11:01:17 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 59233 invoked from network); 7 May 2003 11:01:16 -0000 Message-ID: <001701c31486$adecb410$0200a8c0@MartinWindowsPrimary> From: "Martin Moss" To: "Stas Bekman" Cc: References: <20030506195902.GA13947@www.sirfsup.com> <1052254589.2593.51.camel@localhost.localdomain> <003301c31440$e83f4970$0200a8c0@MartinWindowsPrimary> <3EB874FC.1070404@stason.org> Subject: Re: What the...grrrrrrrr? Global symbol "$bdbh" requires explicit package Date: Wed, 7 May 2003 11:51:56 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Stas, I understand. I suppse the point I was making is that the code does compile, and does work fine provided I start apache from a prmpt. It's only when init starts it that it gives those compilation errors. I'm going to try some extreme chmodding and see if I can trace it to permissions. Then I'll manually specify all modules as 'use', See if I can trace it. I'll post my findings, arty ----- Original Message ----- From: "Stas Bekman" To: "Martin Moss" Cc: Sent: Wednesday, May 07, 2003 3:52 AM Subject: Re: What the...grrrrrrrr? Global symbol "$bdbh" requires explicit package > Martin Moss wrote: > > Hi everyone, > > > > I'm suffering from a quirky problem. > > If I start apache from the command line (as root) with :- > > /etc/init.d/apache_mymodperllink start > > > > my apache server starts fine and I have no issues. > > > > However when I added this to my startup scripts so the above script would be > > called on run levels 3,4,& 5 and then rebooted, I get the following errors:- > > Global symbol "$bdbh" requires explicit package name at > > /home/mydir.prj/perllib//MyModule/Apache/Request.pm line 118 > > One point to note is I'm pre-loading a load of modules dynamically using a > > require, rather than a 'use'. > > Why don't you fix that problem, by defining that symbol? Or do you import it? > or do you have some class that optionally turns the strict pragma on? > > Remember that require happens at runtime, whereas use at compile time. So may > be moving all your requires into a BEGIN {} block will resolve the problem, or > using: > > use Foo (); > > which is the exact equivalent of: > > require Foo; > > but again happens at compile time. > > Without seeing the relevant code it's hard to know what the problem is. > > __________________________________________________________________ > Stas Bekman JAm_pH ------> Just Another mod_perl Hacker > http://stason.org/ mod_perl Guide ---> http://perl.apache.org > mailto:stas@stason.org http://use.perl.org http://apacheweek.com > http://modperlbook.org http://apache.org http://ticketmaster.com > >