Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Symbol table dereference

by broquaint (Abbot)
on Jul 29, 2004 at 03:06 UTC ( #378275=note: print w/ replies, xml ) Need Help??


in reply to Symbol table dereference

I'd recommend looking into qualify_to_ref from Symbol e.g

use strict; use Symbol 'qualify_to_ref'; use Data::Dumper; my $tbl = qualify_to_ref('Data::Dumper::'); print Dumper *$tbl{HASH}; __output__ $VAR1 = { 'ISA' => *Data::Dumper::ISA, 'Useperl' => *Data::Dumper::Useperl, 'Sortkeys' => *Data::Dumper::Sortkeys, 'EXPORT_FAIL' => *Data::Dumper::EXPORT_FAIL, 'new' => *Data::Dumper::new, ...
This neatly side steps the necessity of turning off strict 'refs' and jumping through various hoops to deal with nested package names.
HTH

_________
broquaint


Comment on Re: Symbol table dereference
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2014-09-21 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (165 votes), past polls