1Test2::Harness::Runner:U:sDeerpTCroancterri(b3u)ted PerlTeDsotc2u:m:eHnatranteisosn::Runner::DepTracer(3)
2
3
4

NAME

6       Test2::Harness::Runner::DepTracer - Tool for tracing module
7       dependencies as they are loaded.
8

DESCRIPTION

10       This tool is used by Test2::Harness to build a graph of dependancies
11       which can then be used to blacklist modified modules (and anything
12       thatuses them) when they change under a preloaded runner.
13

SYNOPSIS

15           use Test2::Harness::Runner::DepTracer;
16
17           my $dt = Test2::Harness::Runner::DepTracer->new();
18
19           $dt->start();
20
21           require Some::Thing;
22
23           # You can always check for and retrieve an active DepTrace this way:
24           my $dt_reference = Test2::Harness::Runner::DepTracer->ACTIVE;
25
26           $dt->stop();
27
28           my $dep_map = $dt->dep_map;
29
30           my $loaded_by = $dep_map->{'Some/Thing.pm'};
31           print "Some::Thing was directly or indirectly loaded by:\n" . join("\n" => @$loaded_by) . "\n";
32

ATTRIBUTES

34       These can be specified at construction, and will be populated during
35       use.
36
37       $hashref = $dt->exclude
38           A hashref of files/modules to exclude from dep tracking. By default
39           "strict" and "warnings" are excluded.
40
41       $hashref = $dt->dep_map
42           Every file which is loaded while the tool is started will have an
43           entry in this hash, each value is an array of all files which
44           loaded the key file directly or indirectly.
45
46       $hashref = $dt->loaded
47           How many times each file was directly loaded.
48

METHODS

50       $dt->start
51           Start tracking modules which are loaded.
52
53       $dt->stop
54           Stop tracking moduels that are loaded.
55

CLASS METHODS

57       $dt_or_undef = Test2::Harness::Runner::DepTracer->ACTIVE();
58           Get the currently active DepTracer, if any.
59

SOURCE

61       The source code repository for Test2-Harness can be found at
62       http://github.com/Test-More/Test2-Harness/.
63

MAINTAINERS

65       Chad Granum <exodist@cpan.org>
66

AUTHORS

68       Chad Granum <exodist@cpan.org>
69
71       Copyright 2020 Chad Granum <exodist7@gmail.com>.
72
73       This program is free software; you can redistribute it and/or modify it
74       under the same terms as Perl itself.
75
76       See http://dev.perl.org/licenses/
77
78
79
80perl v5.34.1                      2022-07-1T1est2::Harness::Runner::DepTracer(3)
Impressum