Re: Dissappearing Lexicals

2000-08-31 Thread David E. Wheeler
Okay, my simplified module wouldn't loose the value of the package-level lexical, but here's some output from my DBI library, which still looses the value: DBH Before Prepare: undef DBH Before Connect: undef DBH Connecting... DBH After Connect: Apache::DBI::db=HASH(0x12d2214) DBH After Prepare Co

Re: Dissappearing Lexicals

2000-08-31 Thread David E. Wheeler
Matt Sergeant wrote: > > On Wed, 30 Aug 2000, mgraham wrote: > [snip] > > Personally, I've given up on package-scoped lexicals entirely, and > > moved everything into "use vars". It's a pain, because you lose the > > encapsulation and you have to declare and assign the variables > > separately.

RE: Dissappearing Lexicals

2000-08-30 Thread Matt Sergeant
On Wed, 30 Aug 2000, mgraham wrote: > > > I don't have specific help for your problem, but I have noticed that > package-scoped lexicals can be somewhat unpredictable under mod_perl. > > 1) If at startup time (pre-fork) you use a function within a package > to set a lexical variable that is sc

RE: Dissappearing Lexicals

2000-08-30 Thread mgraham
I don't have specific help for your problem, but I have noticed that package-scoped lexicals can be somewhat unpredictable under mod_perl. 1) If at startup time (pre-fork) you use a function within a package to set a lexical variable that is scoped to that package, that variable may or may not

Dissappearing Lexicals

2000-08-29 Thread David E. Wheeler
Hi All, I've encounted a strange problem with our mod_perl installation. I have a library for handling DBI stuff, and store the $dbh in a package-level lexical. The $dbh is not populated until the first time a DBI call is made - which is during a request and therefore always after Apache forks. T