On Wed Feb 01 16:49:50 2012, tom christiansen wrote:
> In general, Perl has *lexical* scope, and indeed, the
> scope is the ‘font of all privacy’(⋆) in Perl. Think of
> (most) pragmas, for example.
In JavaScript, because of the variable and property equivalence, one can
explicitly create a new scope, within a function, by using the ‘with’
keyword to put an object in scope, so:
{
my $x = $x;
...
}
is written
with({x:x}) {
...
}
--
Father Chrysostomos
---
via perlbug: queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=109408
Thread Previous
|
Thread Next