perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Moss" <Martin_m...@btinternet.com>
Subject Re: What the...grrrrrrrr? Global symbol "$bdbh" requires explicit package
Date Wed, 07 May 2003 10:51:56 GMT
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" <stas@stason.org>
To: "Martin Moss" <martin_moss@btinternet.com>
Cc: <modperl@perl.apache.org>
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
>
>


Mime
View raw message