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

[perl #109408] Documentation that refers to Perl 5 as new

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
February 1, 2012 23:01
Subject:
[perl #109408] Documentation that refers to Perl 5 as new
Message ID:
rt-3.6.HEAD-14510-1328166092-1483.109408-15-0@perl.org
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


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