Devel::TraceRun - Shows all the function calls and returns in a Perl program
$ perl -d -d:TraceRun -S yourscript
Figuring out a large system's workings is hard. Figuring out why it's not working, and where it's going wrong, is even harder.
This tool produces an indented list of all function calls with parameters (in a very very concise format) and return values (ditto). It aims to minimise diffs between runs of a program that are doing the same thing, so that differences stand out.
The output is on
STDOUT currently. That may become overridable in due course.
As may be discerned from the command line, it uses Perl's debugging functionality. However, unlike the normal use of that, it is entirely non-interactive. Instead, it replaces
DB::DB with a no-op, and uses the
DB::sub hook to report function entries and returns.
These reports are indented (currently hardcoded to two spaces), nested according to stack depth. It is intended to be completely obvious what everything means.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.