Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Passing around symbol table aliases

by gnosti (Friar)
on Sep 07, 2011 at 02:42 UTC ( #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
Node Status?
node history
Node Type: perlquestion [id://924505]
Approved by ww
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2017-02-24 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (351 votes). Check out past polls.