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

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

From:
Nick Ing-Simmons
Date:
October 20, 2003 06:14
Subject:
Re: [perl #24250] "return" required in some anonymous closures
Message ID:
20031020131403.2513.20@llama.elixent.com
Elizabeth Mattijsen <liz@dijkmat.nl> writes:
>At 13:34 +0100 10/20/03, Nick Ing-Simmons wrote:
>>  >so this looks like an optimizer problem to me: the $get sub is
>>  >referring to something else than the package lexical $foo.
>>What is a 'package lexical' ?
>>   - things are either in package or lexical never both...
>
>A package lexical is a lexical defined at the package "scope"?
>
>
>package Foo;
>my $package_lexical;
>{
>  my $not_a_package_lexical;
>}
>
>
>I thought that was a pretty well known concept?
Not by me - calling it a package lexical suggests adding a 'package'
would make a difference. It doesn't.

package Bar;
my $file_lexical;   

package Foo;
{
  package Baz;
  my $nested_lexical = $file_lexical;
}





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