Re: getting rid of nested sub lexical problem

2001-01-11 Thread Doug MacEachern
On Sat, 30 Dec 2000, Chris Nokleberg wrote: oooh, cool. I've added this to Apache::DB.xs: int stop_debugger() nice, i'll add that for the next version. It appears that setting PL_perldb to zero is all that's required to turn off the debugger! I thought I might have to fiddle with the

Re: getting rid of nested sub lexical problem

2000-12-30 Thread Chris Nokleberg
On Thu, 21 Dec 2000, Doug MacEachern wrote: On Thu, 19 Oct 2000, Chris Nokleberg wrote: Following up on my post on this subject a couple of months ago, here is a proof-of-concept drop-in replacement for Apache::Registry that eliminates the "my() Scoped Variable in Nested Subroutine"

Re: getting rid of nested sub lexical problem

2000-12-21 Thread Doug MacEachern
On Thu, 19 Oct 2000, Chris Nokleberg wrote: Following up on my post on this subject a couple of months ago, here is a proof-of-concept drop-in replacement for Apache::Registry that eliminates the "my() Scoped Variable in Nested Subroutine" problem. nice hack! It requires PERL5OPT = "-d"

getting rid of nested sub lexical problem

2000-08-16 Thread chris
Due to forgetfulness I was recently bitten by the infamous "my() Scoped Variable in Nested Subroutines" problem using Apache::Registry, and it got me thinking about whether it is fixable. From the diagnostics: This problem can usually be solved by making the inner subroutine anonymous, using

RE: getting rid of nested sub lexical problem

2000-08-16 Thread Douglas Wilson
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 16, 2000 2:17 AM To: [EMAIL PROTECTED] Subject: getting rid of nested sub lexical problem Below is a processed version of the increment_counter example from the guide that works

Re: getting rid of nested sub lexical problem

2000-08-16 Thread Randal L. Schwartz
"Douglas" == Douglas Wilson [EMAIL PROTECTED] writes: Douglas That gives me a 'Variable "$counter" may be unavailable at ./tst2 line 17.' Douglas warning. And its sort of obfuscated (to me, anyway). I'd probably do it this Douglas way: Douglas #!/usr/local/bin/perl -w Douglas use strict;

Re: getting rid of nested sub lexical problem

2000-08-16 Thread chris
Converting "sub foo" into "local *foo = sub" won't work when the function is called before is declared, because the local only works for the rest of the block, not the entire block. i.e. you can't do foo(); local *foo = sub { ... }; Plus, I think you usually need the trailing