Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/poti1/subs-trace
Trace all calls in a package.
https://github.com/poti1/subs-trace
debugging-tool hacktoberfest perl perl5
Last synced: about 1 month ago
JSON representation
Trace all calls in a package.
- Host: GitHub
- URL: https://github.com/poti1/subs-trace
- Owner: poti1
- Created: 2022-09-29T06:24:53.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-13T16:43:41.000Z (2 months ago)
- Last Synced: 2024-10-13T22:22:38.359Z (2 months ago)
- Topics: debugging-tool, hacktoberfest, perl, perl5
- Language: Perl
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
Awesome Lists containing this project
README
# NAME
Subs::Trace - Trace all calls in a package.
# SYNOPSIS
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# DESCRIPTION
This module updates all methods/functions in a class to
also print a message when invoked.(This is a more of a proof-of-concept than useful!)
# SUBROUTINES/METHODS
## import
NOTE: This must be put at the very bottom of a class.
Also, some reason `INIT{ ... }` is not being called with Moose.
Will attach hooks to all functions defined BEFORE this import call.
# AUTHOR
Tim Potapov, ``
# BUGS
Please report any bugs or feature requests to [https://github.com/poti1/subs-trace/issues](https://github.com/poti1/subs-trace/issues).
# SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Subs::Trace
# ACKNOWLEDGEMENTS
TBD
# LICENSE AND COPYRIGHT
This software is Copyright (c) 2022 by Tim Potapov.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)