Hi Ed,

Ed Grimm a écrit :
While Gerald's suggestion is the best one for your specific example,

Yes it is !

there could be other issues you're having that could benefit from further enlightenment.

Thanks for taking this time, I highly appreciate.

[! !] blocks do not declare a lexical scope.

I thought they did because if I declare this :

[- use feature "switch"; -]
[! given(...) { } !]

I have a syntax error : the "use feature 'switch'" *must* be between the [! ... 
!]

> You're running into at least two issues:

1. At the end of page processing, all the private namespace variables are cleaned up, so $req isn't even around for routines in subs.epl after the initial load.

I thought $req was supposed to address this (share data between pages).

> As such, I find it convinent to put all of my global
constants in their own namespace.

That is, storing things in $mysite::req (and adding this to %CLEANUP) ?

> One can disable this cleanup, but
that opens you up to data bleeds and semi-controlled memory bloat.

I know the risks, I won't go that way.

2. These blocks are only processed on the initial load, so $req would be invalid on the subsequent requests anyway.

By "initial load", you mean "the first time apache sees the code" ? Or the
first time this code is "executed" in the Execute() chain ?


Thanks again for your help.

--
Jean-Christophe Boggio                       -o)
embp...@thefreecat.org                       /\\
Independant Consultant and Developer        _\_V

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscr...@perl.apache.org
For additional commands, e-mail: embperl-h...@perl.apache.org

Reply via email to