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

Re: turning EXPR into sub { EXPR }

Thread Previous | Thread Next
Dave Mitchell
July 31, 2001 10:07
Re: turning EXPR into sub { EXPR }
Message ID:
"Jeff 'japhy/Marillion' Pinyan" <> wrote:
> Could someone lend me a hand in turning an expression (or specifically,
> the OP representing it) into an anonymous subroutine?
>   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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About