1Sub::WrapPackages::CallUTsreere(C3o)ntributed Perl DocumSeunbt:a:tWiroanpPackages::CallTree(3)
2
3
4

NAME

6       Sub::WrapPackages::CallTree
7

DESCRIPTION

9       Tool that uses Sub::WrapPackages to show on STDERR a tree of function
10       calls as your code runs, including arguments and a list of return
11       values
12

SYNOPSIS

14       In your code - in a test file, perhaps:
15
16           use Sub::WrapPackages::CallTree qw(My::App::* And::Another::Namespace)
17
18       Or in your environment:
19
20           PERL5OPT=-MSub::WrapPackages::CallTree=My::App::*,And::Another::Namespace
21
22       The results will look something like this:
23
24           Called Sub::WrapPackages::Tests::Victim::foo with: [Sub::WrapPackages::Tests::Victim]
25             Called Sub::WrapPackages::Tests::Victim::bar with: [1]
26               Called Sub::WrapPackages::Tests::Victim::baz with: [OMG, ROBOTS, 5]
27               Return from Sub::WrapPackages::Tests::Victim::baz with: [OMG, ROBOTS, 5]
28             Return from Sub::WrapPackages::Tests::Victim::bar with: [OMG, ROBOTS, 5]
29           Return from Sub::WrapPackages::Tests::Victim::foo with: [2, OMG, ROBOTS, 5]
30
31       NB that all arguments and return values are stringified for display, as
32       there is no way of nicely displaying a tree of function calls as well
33       as complex data structures, and the tree of function calls is more
34       important.
35

PARAMETERS

37       The arguments are the same as those you would pass as the "packages"
38       option to Sub::WrapPackages. The other options have sensible defaults
39       and can not (currently) be set. If you would like to be able to over-
40       ride the defaults please submit a pull request with tests.
41

BUGS and IMPROVEMENTS

43       Please report bugs and submit improvements via Github.
44

THANKS TO

46       Thanks to Will Shepherd, who berated me for cut n pasting the code that
47       implements this all over the place while debugging, and prompting me to
48       wrap it up into a much smaller piece of code that I can splatter all
49       over the place while debugging.
50
52       Copyright 2022 David Cantrell <david@cantrell.org.uk>
53
54       This software is free-as-in-speech software, and may be used,
55       distributed, and modified under the terms of either the GNU General
56       Public Licence version 2 or the Artistic Licence. It's up to you which
57       one you use. The full text of the licences can be found in the files
58       GPL2.txt and ARTISTIC.txt, respectively.
59

CONSPIRACY

61       This code is also free-as-in-mason.
62
63
64
65perl v5.36.0                      2022-07-22    Sub::WrapPackages::CallTree(3)
Impressum