Data::Trace - Trace when a data structure gets updated.
Version 0.02
TODO
use Data::Trace; my $data = {a => [0, {complex => 1}]}; sub BadCall{ $data->{a}[0] = 1 } Data::Trace->Trace($data); BadCall(); # Shows strack trace of where data was changed.
This module provides a convienient way to find out when a data structure has been updated.
It is a debugging/tracing aid for complex systems to identify unintentional alteration to data structures which should be treated as read-only.
Probably can also create a variable as read-only in Moose and see where its been changed, but this module is without Moose support.
Data::Trace->Trace( \$scalar ); Data::Trace->Trace( \@array ); Data::Trace->Trace( \@hash ); Data::Trace->Trace( $complex_data );
Tim Potapov, <tim.potapov at gmail.com>
<tim.potapov at gmail.com>
Please report any bugs or feature requests to https://github.com/poti1/data-trace/issues.
Currently only detect STORE operations. Expand this to also detect PUSH, POP, DELETE, etc.
STORE
PUSH
POP
DELETE
You can find documentation for this module with the perldoc command.
perldoc Data::Trace
TBD
This software is Copyright (c) 2022 by Tim Potapov.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install Data::Trace, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Trace
CPAN shell
perl -MCPAN -e shell install Data::Trace
For more information on module installation, please visit the detailed CPAN module installation guide.