develooper Front page | perl.perl6.language | Postings from July 2002

Re: What's MY.line?

Thread Previous | Thread Next
From:
Chip Salzenberg
Date:
July 11, 2002 12:33
Subject:
Re: What's MY.line?
Message ID:
20020711184723.GE32158@perlsupport.com
According to Dan Sugalski:
> At 9:50 PM -0400 7/9/02, Chip Salzenberg wrote:
> >    3a. If so, how can one distinguish among the e.g. many C<my $foo>
> >        variables declared within the current function?
> 
> One pad per block, rather than per sub.

I just remembered why I thought that woundn't work:  BEGIN is a block.

   my $x = 1;
   BEGIN { %MY::{'$y'} = \$x }
   print $y;

So what do I need to make this aliasing work?  C<%OUTER::MY::>?
-- 
Chip Salzenberg         - a.k.a.  -        <chip@pobox.com>
         "It furthers one to have somewhere to go."

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