1ExtUtils::MakeMaker::CoUvseerragCeo(n3t)ributed Perl DocEuxmteUnttialtsi:o:nMakeMaker::Coverage(3)
2
3
4

NAME

6       ExtUtils::MakeMaker::Coverage - add a Makefile target to determine test
7       coverage using Devel::Cover
8

VERSION

10       Version 0.05
11

SYNOPSIS

13       This module adds an additional target to the Makefile generated by
14       "ExtUtils::MakeMaker".  The target, "testcover", calls "cover", the
15       command-line script to generate test coverage statistics, to clean up
16       any data from a previous run.  It then runs the tests, as if "make
17       test" was run, then calls "cover" again to generate the coverage
18       statistics.
19
20           # In Makefile.PL
21           use ExtUtils::MakeMaker;
22           use ExtUtils::MakeMaker::Coverage;
23           ...
24           # if you already have a MY::postamble...
25           sub MY::postamble {
26               testcover();
27               ...
28           }
29
30           # if you wish to tweak the testcover target that will be written,
31           # alter it's configuration.
32           $conf = ExtUtils::MakeMaker::Coverage->config;
33
34       In your shell
35
36           > perl Makefile.PL
37           > make
38           > make testcover
39

METHODS

41   testcover
42       This method is exported for use when there already is a MY::postamble
43       in the Makefile.PL.  In that case, adding a call to the testcover
44       method will add the necessary Makefile steps.
45
46   config
47       This method returns the internal config object used by this package to
48       create the "testcover" target for the Makefile.
49
50       You can change parts of the "testcover" target by setting accessors of
51       this object
52
53       binary
54           The value to use for the "cover" binary. Defaults to "cover".
55
56       format
57           The output format to use for "cover -report". Defaults to none,
58           using "cover"'s default settings. Consult "perldoc cover" for
59           documentation on its "-report" switch.
60
61       ignore
62           An array ref of patterns to ignore when generating the coverage
63           report. Defaults to an empty list. Consult "perldoc cover" for
64           documentation on its "-ignore" switch.
65
66       files
67           An array ref of test files to run for this coverage reprort.
68           Defaults to the "$(TESTFILES)" variable as defined in your
69           "Makefile". Consult "perldoc ExtUtils::MakeMaker" for details.
70
71       cover_statement
72           Boolean indicating whether to run coverage on statements. Defaults
73           to true. Consult "perldoc cover" for documentation on its
74           "-coverage" switch.
75
76       cover_branch
77           Boolean indicating whether to run coverage on branches. Defaults to
78           true. Consult "perldoc cover" for documentation on its "-coverage"
79           switch.
80
81       cover_subroutine
82           Boolean indicating whether to run coverage on subroutines. Defaults
83           to true. Consult "perldoc cover" for documentation on its
84           "-coverage" switch.
85
86       cover_condition
87           Boolean indicating whether to run coverage on conditions. Defaults
88           to true. Consult "perldoc cover" for documentation on its
89           "-coverage" switch.
90
91       cover_pod
92           Boolean indicating whether to run coverage on POD. Defaults to
93           true. Consult "perldoc cover" for documentation on its "-coverage"
94           switch.
95
96           Example:
97
98               $config = ExtUtils::MakeMaker::Coverage->config;
99
100               $config->pod(0);                    # disable pod coverage
101               $config->files(['t/1.t', 't/2.t']); # use these test files only
102               $config->ignore(['SCCS']);          # ignore files with these
103                                                   # patterns in their path
104

NOTES

106       This is alpha quality code in terms of features.  For this module to be
107       usable for as many modules as possible, the following additional
108       features are needed.
109
110       BSD make
111           From my testing, if you run the testcover step using a BSD make,
112           you will get coverage statistics for the test scripts.  This is not
113           at all useful.  gmake is suggested until this issue is resolved.
114
115       nmake
116           I have not tested this enough with nmake.  I have done some initial
117           changes to make it work, but it requires more refactoring to get to
118           where I'd like to see it.  Expect full support in a release or two.
119

AUTHOR

121       Steve Peters, "<steve@fisharerojo.org>"
122

BUGS

124       Please report any bugs or feature requests to
125       "bug-extutils-makemaker-coverage@rt.cpan.org", or through the web
126       interface at <http://rt.cpan.org>.  I will be notified, and then you'll
127       automatically be notified of progress on your bug as I make changes.
128

ACKNOWLEDGEMENTS

130       Paul Johnson
131           For developing "Devel::Cover" and enduring my many questions on
132           IRC.
133
134       Andy Lester
135           For helping to make me a test-infected Perl programmer.
136
137       Jos Boumans
138           For making many of the changes for the 0.05 release, including the
139           testcover script.
140

SEE ALSO

142       Devel::Cover
143       <http://qa.perl.org>
144
146       Copyright 2005 Steve Peters, All Rights Reserved.
147
148       This program is free software; you can redistribute it and/or modify it
149       under the same terms as Perl itself.
150
151
152
153perl v5.30.1                      2020-01-30  ExtUtils::MakeMaker::Coverage(3)
Impressum