Subs::Trace - Trace all calls in a package.
Version 0.01
Similar to
around 'my_function' => sub { my $original = shift; print "--> my_function\n"; $original->(@_); };
But for ALL functions in a class.
package MyClass; sub Func1 { ... } sub Func2 { ... } sub Func3 { ... } use Subs::Trace; Func1(); # Prints: # --> MyClass::Func1
This module updates all methods/functions in a class to also print a message when invoked.
NOTE: This must be put at the very bottom of a class.
Also, some reason INIT{ ... } is not being called with Moose.
INIT{ ... }
Will attach hooks to all functions defined BEFORE this import call.
Tim Potapov, <tim.potapov at gmail.com>
<tim.potapov at gmail.com>
Please report any bugs or feature requests to https://github.com/poti1/subs-trace/issues.
You can find documentation for this module with the perldoc command.
perldoc Subs::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 Subs::Trace, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Subs::Trace
CPAN shell
perl -MCPAN -e shell install Subs::Trace
For more information on module installation, please visit the detailed CPAN module installation guide.