develooper Front page | perl.perl5.porters | Postings from September 2012

Re: Twisted CvOUTSIDE and lexical/anon sub issues ([perl #113930]Lexical subs )

Thread Previous
From:
Reverend Chip
Date:
September 9, 2012 00:59
Subject:
Re: Twisted CvOUTSIDE and lexical/anon sub issues ([perl #113930]Lexical subs )
Message ID:
504C4C60.8090809@gmail.com
On 8/23/2012 10:23 PM, Father Chrysostomos via RT wrote:
> On Thu Aug 23 19:13:47 2012, rev.chip@gmail.com wrote:
>> On 8/12/2012 6:22 PM, Father Chrysostomos via RT wrote:
>>> I don’t think it is worth it.  Both examples above should warn with
>>> ‘Variable "$x" is not available’.  Opinions?
>> I'd have thought the primary error is that I have no reason to demand
>> that "sub bar" should work when it's not in the same scope as the
>> declaration "my sub bar".
> It would be useful to be able to redefine the subroutine at run time:
>
> sub foo {
>   my sub bar;
>   eval 'sub bar {' . $stuff . '}';
> }

That's a nicety I would have been willing to do without but ... OK,
thank you.


Thread Previous


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