Variable::WatcherKeep track of changes on my variables | |
Download |
Variable::Watcher Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Jos Boumans
- Publisher web site:
- http://search.cpan.org/~kane/
Variable::Watcher Tags
Variable::Watcher Description
Keep track of changes on my variables Variable::Watcher is a Perl module that allows you to keep track of mutations on my variables. It will record every mutation you do to a variable that is being Watched. You can retrieve these mutations as a list or as a big printable string, filtered by a regex if you like.This is a useful debugging tool when you find your my variables in a state you did not expect.See the CAVEATS section for the limitations of this approach.SYNOPSIS ### keep track of scalar changes my $scalar : Watch(s) = 1; ### keep track of array changes my @list : Watch(l) = (1); ### keep track of hash changes my %hash : Watch(h) = (1 => 2); ### retrieve individual mutations: my @stack = Variable::Watcher->stack; ### retrieve the mutation as a printable string my $string = Variable::Watcher->stack_as_string; ### flush the logs of all the mutations so far Variable::Watcher->flush; ### Set the default reporting filehandle (defaults to STDERR ### -- see the C section $Variable::Watcher::REPORT_FH = \*MY_FH; ### Make Variable::Watcher not print to REPORT_FH when running ### You will have to use the stack/stack_as_string method to ### retrieve the logs. See the C section $Variable::Watcher::VERBOSE = 0; Requirements: · Perl
Variable::Watcher Related Software