develooper Front page | perl.perl5.porters | Postings from August 2009

Re: [perl #68020] Evil combination of regexes, lexicals, andautovivication

Thread Previous | Thread Next
Dave Mitchell
August 3, 2009 13:52
Re: [perl #68020] Evil combination of regexes, lexicals, andautovivication
Message ID:
On Wed, Jul 29, 2009 at 11:46:39AM -0700, John Peacock wrote:
>    my $rx = qr{ (?{ @arr = [1]; $arr[-1][0] = 0; my $var; }) }x;

Any use of lexical vars within (?{...}) is currently deeply broken due to
the braindead way it's implemented (eval the code, then keep the eval'd
CV's body around for future use. Eveything related to pads and closures is
then wrong).

I've had this on my list of things to fix for years. Got halfway to
a solution, then maint pumpkingness took over my life...

This email is confidential, and now that you have read it you are legally
obliged to shoot yourself. Or shoot a lawyer, if you prefer. If you have
received this email in error, place it in its original wrapping and return
for a full refund. By opening this email, you accept that Elvis lives.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About