Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

getting the lexicals - the overloading option

by shushu (Scribe)
on Oct 10, 2002 at 15:43 UTC ( [id://204207]=note: print w/replies, xml ) Need Help??


in reply to Re: PadWalker and Safe - getting the lexicals
in thread PadWalker and Safe - getting the lexicals

Before I jump into the cold water of perlguts I wanted to check another option to get what I want.
In short - all I want it to print to a file the value of every lexical variable used in the executed code.

The second idea was to overload all of the operators, and make them just print before doing their job.
Well, we thought about this option only because we never actually did overloading.
After reading the stuff I understand that overloading is done only for specific types, so to use it the code shoud have something like:
my $a = new OVERLOADED "value";
Which is impossible in our case.

The question is - is there a way to overload ALL of the basic types of Perl and inherit it "quietly" to the Safe compartement ?

TIA,
shushu

Log In?
Username:
Password:

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

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

    No recent polls found