Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: reset function

by Eily (Curate)
on Nov 20, 2013 at 23:54 UTC ( #1063636=note: print w/ replies, xml ) Need Help??


in reply to reset function

You surely don't want to do that. That looks like a very bad idea.

If you're still there, you can change the SCALAR portion of all GLOBs in the symbol table of your current package which start with a v. That's easy, you just have to look inside a hash. This will reset all variables starting with a v that are not lexically scoped, ie: for which you don't have a my.

For the lexicals, there is the module PadWalker, peek_my(0) will give you a list of visible lexical variables in a hashref. How wonderful :).

Good luck with that crazy idea.


Comment on Re: reset function
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2015-07-30 10:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls