document updated 11 years ago, on Jul 13, 2011
PadWalker is awfully useful.
Yes, it says it's not for production use. Yes, it violates the principle of least astonishment ("I thought private variables stayed private!"). But it still comes in handy sometimes.
Notable modules that use this
There are a LOT of modules that use PadWalker. Some of the more important ones (IMHO) are:
- doing lexicals ⇒ hash, or hash ⇒ lexicals
- change the behavior of eval()
- change the behavior of string-interpolation
- runtime tracing, that prints out the variable names and/or values for each line (or stack dumps that do similar)
- enhanced versions of Data::Dumper