Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Passing around symbol table aliases

by gnosti (Chaplain)
on Sep 07, 2011 at 02:42 UTC ( [id://924505]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #### Main.pm
    
    ...
    *bn = \%Bus::by_name;
    
    print $tn{Master}->name # Master
    
  2. or download this
    #### ChainSetup.pm
    
    ...
    
    package ChainSetup;
    my $master_fader = $tn{Master};
    
  3. or download this
    #### Globals.pm
    
    ...
    package ChainSetup;
    use Globals qw(%tn %ti %bn);
    print $tn{Master}->name; # can't do method 'name' on undef
    
  4. or download this
    #### Globals.pm
    
    ...
    eval $code;
    die "error: $@ in eval of code: $code" if $@;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://924505]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-24 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found