Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Dynamically Changing Your Namespace

by phaylon (Curate)
on Mar 31, 2007 at 16:35 UTC ( [id://607633]=note: print w/replies, xml ) Need Help??


in reply to Dynamically Changing Your Namespace

This could work easily if there were a non-scoping (read: unhygienic) version of eval. Then it would be just a

if ($foo) { unhygienic_eval "package $foo"; sub bar { 23 } }

But I have no experience with the perl guts and expect this to be much more work than it looks like.


Ordinary morality is for ordinary people. -- Aleister Crowley

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-20 03:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found