Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Sharing Namespaces

by shotgunefx (Parson)
on Jan 30, 2006 at 14:41 UTC ( [id://526454]=note: print w/replies, xml ) Need Help??


in reply to Re: Sharing Namespaces
in thread Sharing Namespaces

perl -le '$Foo::bar = "Hello"; *Baz::bar = *Foo::bar; print $Baz::bar +'
Works if you iterate over the namespace instead of trying to do it in one shot.

For slinging around globs, you might find this snippet illustrative. Basically a very small exporter.

Why not just use set up the module to by default, export everything you're interested in. Then it's a matter of just adding the "use" statement to each module/script, (but they're already using it right?).


-Lee

perl digital dash (in progress)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2024-04-25 00:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found