develooper Front page | perl.perl5.porters | Postings from July 2001

Re: turning EXPR into sub { EXPR }

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
July 31, 2001 10:07
Subject:
Re: turning EXPR into sub { EXPR }
Message ID:
200107311706.SAA14932@gizmo.fdgroup.co.uk
"Jeff 'japhy/Marillion' Pinyan" <jeffp@crusoe.net> wrote:
> Could someone lend me a hand in turning an expression (or specifically,
> the OP representing it) into an anonymous subroutine?
[snip]
>   o2 = newANONSUB(
>     start_subparse(FALSE, CVf_ANON),
>     Nullop,
>     block_end(block_start(TRUE), kid)
>   );

I don't see how that could work - start_subparse() must be called before
the block is parsed in order to set the correct scope for the manipulation
of lexicals within the block. In the code above, the block has already been
parsed by the time start_subparse() is called.

(But I could be wrong!)

Dave M.



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About