Sub::W...allTree(3pm)
β¨ NAME β¨
okay so this is Sub::W...allTree(3pm) β the manual page for Sub::WrapPackages::CallTree, bestie π and what it does is literally show you a tree of function calls π³
πΈ DESCRIPTION πΈ
it's a tool that uses Sub::WrapPackages to show on STDERR a tree of function calls as your code runs π«Ά
and not just the calls β it also shows the arguments, and a list of return values. obsessed. π
π¦ SYNOPSIS π¦
in your code β in a test file, perhaps:
use Sub::WrapPackages::CallTree qw(My::App::* And::Another::Namespace)
or in your environment:
PERL5OPT=-MSub::WrapPackages::CallTree=My::App::*,And::Another::Namespace
the results will look something like this:
Called Sub::WrapPackages::Tests::Victim::foo with: [Sub::WrapPackages::Tests::Victim]
Called Sub::WrapPackages::Tests::Victim::bar with: [1]
Called Sub::WrapPackages::Tests::Victim::baz with: [OMG, ROBOTS, 5]
Return from Sub::WrapPackages::Tests::Victim::baz with: [OMG, ROBOTS, 5]
Return from Sub::WrapPackages::Tests::Victim::bar with: [OMG, ROBOTS, 5]
Return from Sub::WrapPackages::Tests::Victim::foo with: [2, OMG, ROBOTS, 5]
NB that all arguments and return values are stringified for display π β because there is genuinely no way of nicely displaying a tree of function calls as well as complex data structures, and the tree of function calls is the more important one. so it ate the priority slot. periodt. π
π PARAMETERS π
the arguments are the same as those you would pass as the "packages" option to Sub::WrapPackages. the other options have sensible defaults and can not (currently) be set π« β if you would like to be able to override the defaults, please submit a pull request with tests π
π BUGS and IMPROVEMENTS π
please report bugs and submit improvements via Github π
π THANKS TO π
thanks to Will Shepherd, who berated me for cut n pasting the code that implements this all over the place while debugging π, and prompting me to wrap it up into a much smaller piece of code that I can splatter all over the place while debugging. iconic behaviour honestly. π«Ά
π COPYRIGHT and LICENCE π
Copyright 2022 David Cantrell <david@cantrell.org.uk>
this software is free-as-in-speech software β¨ and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. it's up to you which one you use π
the full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively.
π§ CONSPIRACY π§
this code is also free-as-in-mason. π§±
and that's the whole page, bestie π it was perl v5.34.0, dated 2022-07-23, and generated straight from Sub::W...allTree(3pm) β love that for us π
π¦ where this page comes from
- debian bookworm: libsub-wrappackages-perl 2.02-1 Β· Artistic-1.0-Perl OR GPL-2.0-or-later
- debian trixie: libsub-wrappackages-perl 2.02-1 Β· Artistic-1.0-Perl OR GPL-2.0-or-later
- ubuntu noble: libsub-wrappackages-perl 2.02-1 Β· Artistic-1.0-Perl OR GPL-2.0-or-later
- ubuntu resolute: libsub-wrappackages-perl 2.02-1 Β· Artistic-1.0-Perl OR GPL-2.0-or-later
- ubuntu stonking: libsub-wrappackages-perl 2.02-1 Β· Artistic-1.0-Perl OR GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms