develooper Front page | perl.perl5.porters | Postings from October 2003

RE: [perl #24250] "return" required in some anonymous closures

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
October 20, 2003 06:19
Subject:
RE: [perl #24250] "return" required in some anonymous closures
Message ID:
20031020131854.2513.22@llama.elixent.com
Yves Orton <yves.orton@de.mci.com> writes:
>> A package lexical is a lexical defined at the package "scope"?
>
>Except that there is no such thing as package scope. There is file scope and
>block scope, nothing else.
>
>If you want a "package lexical" youll have to wrap the whole thing in a
>block.


>
>package foo;
>{
>  my $package_foo_lexical;
>}
>
>or 
>
>{
>  package foo;
>  my $package_foo_lexical;
>}
>
>Personally I like the first one more....

And both are surely equivalent to 

{
 my $invisible_lexical;
}


>
>Yves


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