Re: global variables and reparsing (short reproducible example)

2000-11-25 Thread Stas Bekman
On 24 May 2000, Randal L. Schwartz wrote: > > "tayers" == <[EMAIL PROTECTED]> writes: > > tayers> Given the above more complete descriptions I would say the usage in > tayers> L is confusing. > > I agree with that, and with your general observation. From my hanging > out on P5P, a subro

Re: global variables and reparsing (short reproducible example)

2000-06-01 Thread Doug MacEachern
On Fri, 26 May 2000, Marc Lehmann wrote: > On Thu, May 25, 2000 at 12:09:09PM -0700, Doug MacEachern <[EMAIL PROTECTED]> wrote: > > > You can only configure Apache from sections, but you can load all > > > your modules, shared data, etc. from a file pulled in with PerlRequire. > > > > actually

Re: global variables and reparsing (short reproducible example)

2000-05-25 Thread Marc Lehmann
On Thu, May 25, 2000 at 12:09:09PM -0700, Doug MacEachern <[EMAIL PROTECTED]> wrote: > > You can only configure Apache from sections, but you can load all > > your modules, shared data, etc. from a file pulled in with PerlRequire. > > actually you can, if a module defines variables in the > Apac

Re: global variables and reparsing (short reproducible example)

2000-05-25 Thread Doug MacEachern
On Thu, 25 May 2000, Marc Lehmann wrote: > Actually, and to my surprise, PerlModule/PerlRequire is not done twice, > at leats not with respect to reparsing. They simply don't reparse the > modules, so mod_perl works *perfectly* without PerlFreshRestart, and > without special measures. right, be

Re: global variables and reparsing (short reproducible example)

2000-05-25 Thread Doug MacEachern
On Wed, 24 May 2000, Perrin Harkins wrote: > On Wed, 24 May 2000, Marc Lehmann wrote: > > I was under the impression that you cannot configure Apache from a > > PerlRequire. If that is not the case (and somehow works) I'd really like > > to get away from perlsections. > > You can only configure

Re: global variables and reparsing (short reproducible example)

2000-05-24 Thread Marc Lehmann
On Wed, May 24, 2000 at 11:55:09AM -0700, Perrin Harkins <[EMAIL PROTECTED]> wrote: > > I was under the impression that you cannot configure Apache from a > > PerlRequire. If that is not the case (and somehow works) I'd really like > > to get away from perlsections. > > You can only configure Apa

Re: global variables and reparsing (short reproducible example)

2000-05-24 Thread Marc Lehmann
On Wed, May 24, 2000 at 11:30:40AM -0700, Perrin Harkins <[EMAIL PROTECTED]> wrote: > > example did something similar, indeed, but it had to be embedded into the > > module source, which is somewhat inconvinient. > > If you don't have PerlFreshRestart turned on (it is not recommended on > product

Re: global variables and reparsing (short reproducible example)

2000-05-24 Thread Perrin Harkins
On Wed, 24 May 2000, Marc Lehmann wrote: > I was under the impression that you cannot configure Apache from a > PerlRequire. If that is not the case (and somehow works) I'd really like > to get away from perlsections. You can only configure Apache from sections, but you can load all your modules

Re: global variables and reparsing (short reproducible example)

2000-05-24 Thread Perrin Harkins
On Wed, 24 May 2000, Marc Lehmann wrote: > On Wed, May 24, 2000 at 12:52:37AM +0300, Stas Bekman <[EMAIL PROTECTED]> wrote: > >You can control what's being reloaded and what's not: > >http://perl.apache.org/guide/config.html#Apache_Restarts_Twice_On_Start >

Re: global variables and reparsing (short reproducible example)

2000-05-24 Thread Randal L. Schwartz
> "tayers" == <[EMAIL PROTECTED]> writes: tayers> Given the above more complete descriptions I would say the usage in tayers> L is confusing. I agree with that, and with your general observation. From my hanging out on P5P, a subroutine is only a closure when it sees lexical variables an

Re: global variables and reparsing (short reproducible example)

2000-05-24 Thread tayers
> "M" == Marc Lehmann <[EMAIL PROTECTED]> writes: M> On Tue, 23 May 2000, Perrin Harkins wrote: >> Your sub &x is a closure. That's why it returns the previous value of M> No. In perl, a closure is *defined* as "anonymous subroutine" (see the M> documentation). If you define it different, yo

Re: global variables and reparsing (short reproducible example)

2000-05-24 Thread Marc Lehmann
On Tue, 23 May 2000, Perrin Harkins wrote: > Your sub &x is a closure. That's why it returns the previous value of No. In perl, a closure is *defined* as "anonymous subroutine" (see the documentation). If you define it different, you are right, but you are not talking about perl then. --

Re: global variables and reparsing (short reproducible example)

2000-05-24 Thread Marc Lehmann
On Wed, May 24, 2000 at 12:52:37AM +0300, Stas Bekman <[EMAIL PROTECTED]> wrote: >You can control what's being reloaded and what's not: >http://perl.apache.org/guide/config.html#Apache_Restarts_Twice_On_Start >

Re: global variables and reparsing (short reproducible example)

2000-05-24 Thread Marc Lehmann
On Tue, May 23, 2000 at 04:07:40PM -0700, Perrin Harkins <[EMAIL PROTECTED]> wrote: > This is a combination of closures and PerlFreshRestart biting (still no closures) My example might be misleading, since I used x before it was defined (to make the example short). Typical examples look like this

Re: global variables and reparsing (short reproducible example)

2000-05-23 Thread Doug MacEachern
On Tue, 23 May 2000, Perrin Harkins wrote: > Your sub &x is a closure. That's why it returns the previous value of > $x. When it gets re-defined, it should start looking at the value of the > new $x. nevermind what i said in the other reply about not being a closure. you're right, it is by def

Re: global variables and reparsing (short reproducible example)

2000-05-23 Thread Perrin Harkins
On Tue, 23 May 2000, Marc Lehmann wrote: > No, it's completely deterministic ("sometimes" == depending on the when > the function was compiled). The technical aspect is clear (to me at > least, but I am bad at explaining ;): the file is sourced twice, and the > function is compiled twice (and sinc

Re: global variables and reparsing (short reproducible example)

2000-05-23 Thread Stas Bekman
On Tue, 23 May 2000, Marc Lehmann wrote: > On Tue, May 23, 2000 at 11:53:04AM -0700, Doug MacEachern <[EMAIL PROTECTED]> wrote: > > > a lot of data sharing between the httpd servers. My module requires you to > > > call "configured PApp" at the end of the configuration section so that it > > > ca

Re: global variables and reparsing (short reproducible example)

2000-05-23 Thread Marc Lehmann
On Tue, May 23, 2000 at 11:53:04AM -0700, Doug MacEachern <[EMAIL PROTECTED]> wrote: > > a lot of data sharing between the httpd servers. My module requires you to > > call "configured PApp" at the end of the configuration section so that it > > can pull in most of the code and big data structures

Re: global variables and reparsing (short reproducible example)

2000-05-23 Thread Doug MacEachern
On Tue, 23 May 2000, Marc Lehmann wrote: > As a related note, I wondered why there isn't a mod_perl callback that is > clled _before_ forking, but after configuration parsing. This would allow > a lot of data sharing between the httpd servers. My module requires you to > call "configured PApp" a

global variables and reparsing (short reproducible example)

2000-05-23 Thread Marc Lehmann
On Tue, May 23, 2000 at 07:15:46AM -0500, Ken Williams <[EMAIL PROTECTED]> wrote: > >my $global = 5; > >sub set_global { > > $global = shift; > >} > >othermodule::set_global 7; > >= > >Then, to my surprise, _sometimes_