On Thursday 06 May 2004 11:40 am, Perrin Harkins wrote: > On Thu, 2004-05-06 at 17:19, Beau E. Cox wrote: > > But maybe I could explain the overall picture. I am trying to embed > > 'any' script (whthout modification) in perl; I use a perl package > > (which is run via a c program) to maintain 'persistence' of the script > > which is read from disk. This must be done in the mod_perl registry > > for cgi scripts, but my search of the mod_perl source so far has > > been fruitless. > > The code is in Apache::Registry, or ModPerl::RegistryCooker for mp2. > It's pure perl and pretty easy to read. It has the same problem as > yours though, i.e. subs that refer to lexicals declared outside of them > generate this error. Normally, that sub would just be a closure, but > once you nest it you get an actual leak. > > Workarounds are described in the mod_perl docs here: > http://perl.apache.org/docs/general/perl_reference/perl_reference.html#my__ >_Scoped_Variable_in_Nested_Subroutines > > I don't think you can solve this nicely without limiting the sort of > code that you allow. >
Perrin - thanks so much. The reference you give explains all! This thread is now closed ;) Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>