in reply to Knowing when variables change?
A not-so-difficult approach is to create a few tie classes, for arrays, scalars, hashes, and even filehandles if you wish. The classes should either log, or carp whenever a tied variable is modified.
You won't be tieing every variable in your script (probably), but you can easily tie a few important (or suspect) ones.
I posted a node with example code for tieing a scalar for the purpose of watching its access here: Re: Trapping acces to variables in-code. The example can easily be used as a starting point for hashes and arrays too.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Knowing when variables change?
by Anonymous Monk on Oct 24, 2004 at 16:50 UTC | |
by davido (Cardinal) on Oct 24, 2004 at 16:55 UTC | |
by Anonymous Monk on Oct 24, 2004 at 17:09 UTC |