Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Namespace variable gathering

by samtregar (Abbot)
on Apr 24, 2002 at 22:16 UTC ( [id://161812]=note: print w/replies, xml ) Need Help??


in reply to Namespace variable gathering

Yes, all packages have a hash for their symbol table. The keys are symbol names and the values are typeglobs. There are many ways to use the symbol table to get a list of names and scalar values. Here's one - it calls $template->param() with the names and values in the package "Values":
{ no strict 'refs'; $template->param(map { $_ => ${"Values::$_"} } keys %Values::); }

-sam

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-20 01:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found