Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 imbibing at the Monastery: (4)
As of 2017-04-29 11:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (531 votes). Check out past polls.