ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl6-language
perl6-language
Re: How much do we close over?
by Chip Salzenberg other posts by this author
Jun 12 2005 11:15PM messages near this date
Re: Optimisations (was Re: How much do we close over?) | Re: How much do we close over?
On Sun, Jun 12, 2005 at 11:26:49PM +0100, Piers Cawley wrote:
>      sub foo { my $x = 1; return sub { eval $^codestring } }
>      say foo()("$x");

I'm pretty sure you meant single-quoted, and you perhaps might maybe
need a dot there:

     sub foo { my $x = 1; return sub { eval $^codestring } }
     say foo().('$x');

>  I claim that that should print 1. Chip claims it should throw a warning about
>  because of timely destruction.

More like an error from the eval: '$x: no such variable in scope'.
-- 
Chip Salzenberg <chip@[...].com> 

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved