Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Creating "Lexical" Symbol Table Aliases (a la "use vars") From The Same Package

by Anonymous Monk
on May 09, 2014 at 00:38 UTC ( #1085522=note: print w/ replies, xml ) Need Help??


in reply to Creating "Lexical" Symbol Table Aliases (a la "use vars") From The Same Package

Yes, I know. There's More Than One Way To Do It, and I'm MORE curious about the underlying question of why THIS way happens to fail.

I think you will have to UTSL to know why .... basically you're looking too close at it :)

http://perl5.git.perl.org/perl.git/blob?f=t/lib/strict/vars
http://perl5.git.perl.org/perl.git?a=search&h=HEAD&st=grep&s=^H
http://perl5.git.perl.org/perl.git/blob?f=gv.c#l1623
http://perl5.git.perl.org/perl.git/blob?f=cop.h#l391
http://perl5.git.perl.org/perl.git/blob?f=gv.c#l1954
http://perl5.git.perl.org/perl.git?a=search&h=HEAD&st=grep&s=hints
http://perl5.git.perl.org/perl.git/blob?f=gv.c#l1578
http://perl5.git.perl.org/perl.git?a=search&h=HEAD&st=grep&s=STRICT_VARS

Comment on Re: Creating "Lexical" Symbol Table Aliases (a la "use vars") From The Same Package
Replies are listed 'Best First'.
Re^2: Creating "Lexical" Symbol Table Aliases (a la "use vars") From The Same Package
by tobyink (Abbot) on May 09, 2014 at 10:50 UTC

    Those bits of source show how strict vars works, but what I'm more interested (and couldn't figure out) is which part of the code determines whether or not a glob assignment will result in setting the IMPORT flag on the GV.

    Which bit of code does it? And is there a great big comment by that code explaining why it's done the way it's done?

    use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1085522]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2016-04-30 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    :nehw tseb si esrever ni gnitirW







    Results (441 votes). Check out past polls.