develooper Front page | perl.perl6.language | Postings from August 2005

Symbolic dereferentiation of magical variables

Thread Next
From:
Ingo Blechschmidt
Date:
August 20, 2005 15:40
Subject:
Symbolic dereferentiation of magical variables
Message ID:
loom.20050821T002915-146@post.gmane.org
Hi, 
 
S02 says: 
    our $a; say $::("a");     # works 
 
    my $a; say $::("a");      # dies, you should use: 
    my $a; say $::("MY::a");  # works 
 
How can I use symbolic dereferentiation to get $?SELF, $?CLASS, 
::?CLASS, %MY::, etc.? 
 
    say $::('$?SELF');        # does this work? 
    say $::('MY::$?SELF');    # or this? 
 
 
Also, is $::! valid syntax? (Or am I required to write this as 
$::("!")?) 
 
 
--Ingo 
 
--  
Linux, the choice of a GNU | self-reference, n. - See self-reference   
generation on a dual AMD   |  
Athlon!                    |  


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