Skip to content

Commit 13b9252

Browse files
committed
Update documentation
1 parent d5ac71c commit 13b9252

File tree

2 files changed

+41
-30
lines changed

2 files changed

+41
-30
lines changed

README.md

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,17 @@ discover areas of code not exercised by your tests and determine which tests to
88
create to increase coverage. Code coverage can be considered an indirect
99
measure of quality.
1010

11-
Although it is still being developed, Devel::Cover is now quite stable and
12-
provides many of the features to be expected in a useful coverage tool.
11+
Devel::Cover is now quite stable and provides many of the features to be
12+
expected in a useful coverage tool.
1313

1414
Statement, branch, condition, subroutine, and pod coverage information is
1515
reported. Statement and subroutine coverage data should be accurate. Branch
1616
and condition coverage data should be mostly accurate too, although not always
1717
what one might initially expect. Pod coverage comes from Pod::Coverage. If
18-
Pod::Coverage::CountParents is available it will be used instead. Coverage
19-
data for other criteria are not yet collected.
18+
Pod::Coverage::CountParents is available it will be used instead.
2019

21-
The cover program can be used to generate coverage reports. Devel::Cover ships
22-
with a number of reports including various types of HTML output, textual
20+
The `cover` program can be used to generate coverage reports. Devel::Cover
21+
ships with a number of reports including various types of HTML output, textual
2322
reports, a report to display missing coverage in the same format as compilation
2423
errors and a report to display coverage information within the Vim editor.
2524

@@ -28,7 +27,7 @@ to an HTML report showing who last changed a line, as determined by git blame.
2827
Some annotation modules are shipped with Devel::Cover and you can easily create
2928
your own.
3029

31-
The gcov2perl program can be used to convert gcov files to "Devel::Cover"
30+
The `gcov2perl` program can be used to convert gcov files to `Devel::Cover`
3231
databases. This allows you to display your C or XS code coverage together with
3332
your Perl coverage, or to use any of the Devel::Cover reports to display your C
3433
coverage data.
@@ -37,42 +36,55 @@ Code coverage data are collected by replacing perl ops with functions which
3736
count how many times the ops are executed. These data are then mapped back to
3837
reality using the B compiler modules. There is also a statement profiling
3938
facility which should not be relied on. For proper profiling use
40-
Devel::NYTProf. Previous versions of Devel::Cover collected coverage data by
41-
replacing perl's runops function. It is still possible to switch to that mode
42-
of operation, but this now gets little testing and will probably be removed
43-
soon. You probably don't care about any of this.
39+
[Devel::NYTProf](https://metacpan.org/pod/Devel::NYTProf). Previous versions
40+
of Devel::Cover collected coverage data by replacing perl's runops function.
41+
It is still possible to switch to that mode of operation, but this now gets
42+
little testing and will probably be removed soon. You probably don't care
43+
about any of this.
4444

4545
The most appropriate mailing list on which to discuss this module would be
46-
perl-qa. See <http://lists.perl.org/list/perl-qa.html>.
46+
[perl-qa](http://lists.perl.org/list/perl-qa.html).
4747

48-
The Devel::Cover repository can be found at
49-
<http://github.com/pjcj/Devel--Cover>. This is also where problems should be
50-
reported.
48+
The Devel::Cover repository can be found on
49+
[github](http://github.com/pjcj/Devel--Cover). This is also where problems
50+
should be reported.
5151

5252
To get coverage for an uninstalled module:
5353

54-
cover -test
54+
```sh
55+
cover -test
56+
```
5557

5658
or
5759

58-
cover -delete
59-
HARNESS_PERL_SWITCHES=-MDevel::Cover make test
60-
cover
60+
```sh
61+
cover -delete
62+
HARNESS_PERL_SWITCHES=-MDevel::Cover make test
63+
cover
64+
```
6165

6266
To get coverage for an uninstalled module which uses Module::Build (0.26 or
6367
later):
6468

65-
./Build testcover
69+
```sh
70+
./Build testcover
71+
```
6672

67-
If the module does not use the t/*.t framework:
73+
If the module does not use the t/\*.t framework:
6874

69-
PERL5OPT=-MDevel::Cover make test
75+
```sh
76+
PERL5OPT=-MDevel::Cover make test
77+
```
7078

7179
If you want to get coverage for a program:
7280

73-
perl -MDevel::Cover yourprog args
74-
cover
81+
```sh
82+
perl -MDevel::Cover yourprog args
83+
cover
84+
```
7585

7686
To alter default values:
7787

78-
perl -MDevel::Cover=-db,cover_db,-coverage,statement,time yourprog args
88+
```sh
89+
perl -MDevel::Cover=-db,cover_db,-coverage,statement,time yourprog args
90+
```

lib/Devel/Cover.pm

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,15 +1339,14 @@ discover areas of code not exercised by your tests and determine which tests
13391339
to create to increase coverage. Code coverage can be considered an indirect
13401340
measure of quality.
13411341
1342-
Although it is still being developed, Devel::Cover is now quite stable and
1343-
provides many of the features to be expected in a useful coverage tool.
1342+
Devel::Cover is now quite stable and provides many of the features to be
1343+
expected in a useful coverage tool.
13441344
13451345
Statement, branch, condition, subroutine, and pod coverage information is
13461346
reported. Statement and subroutine coverage data should be accurate. Branch
13471347
and condition coverage data should be mostly accurate too, although not always
1348-
what one might initially expect. Pod coverage comes from L<Pod::Coverage>.
1349-
If L<Pod::Coverage::CountParents> is available it will be used instead.
1350-
Coverage data for other criteria are not yet collected.
1348+
what one might initially expect. Pod coverage comes from L<Pod::Coverage>. If
1349+
L<Pod::Coverage::CountParents> is available it will be used instead.
13511350
13521351
The F<cover> program can be used to generate coverage reports. Devel::Cover
13531352
ships with a number of reports including various types of HTML output, textual

0 commit comments

Comments
 (0)