1Devel::Cover::DB(3)   User Contributed Perl Documentation  Devel::Cover::DB(3)
2
3
4

NAME

6       Devel::Cover::DB - Code coverage metrics for Perl
7

SYNOPSIS

9        use Devel::Cover::DB;
10
11        my $db = Devel::Cover::DB->new(db => "my_coverage_db");
12        $db->print_summary(statement => 1, pod => 1);
13        $db->print_details;
14

DESCRIPTION

16       This module provides access to a database of code coverage information.
17

SEE ALSO

19        Devel::Cover
20

METHODS

22       new
23
24        my $db = Devel::Cover::DB->new(db => "my_coverage_db");
25
26       Contructs the DB from the specified database.
27
28       cover
29
30        my $cover = $db->cover;
31
32       Returns a Devel::Cover::DB::Cover object.  From here all the coverage
33       data may be accessed.
34
35        my $cover = $db->cover;
36        for my $file ($cover->items)
37        {
38            print "$file\n";
39            my $f = $cover->file($file);
40            for my $criterion ($f->items)
41            {
42                print "  $criterion\n";
43                my $c = $f->criterion($criterion);
44                for my $location ($c->items)
45                {
46                    my $l = $c->location($location);
47                    print "    $location @$l\n";
48                }
49            }
50        }
51
52       Data for different criteria will be in different formats, so that will
53       need special handling, but I'll deal with that when we have the data
54       for different criteria.
55
56       If you don't want to remember all the method names, use values()
57       instead of files(), criteria() and locations() and get() instead of
58       file(), criterion() and location().
59
60       Instead of calling $file->criterion("x") you can also call $file->x.
61
62       is_valid
63
64        my $valid = $db->is_valid;
65
66       Returns true iff the db is valid.  (Actually there is one too many fs
67       there, but that's what it should do.)
68

BUGS

70       Huh?
71

VERSION

73       Version 0.61 - 10th January 2007
74

LICENCE

76       Copyright 2001-2007, Paul Johnson (pjcj@cpan.org)
77
78       This software is free.  It is licensed under the same terms as Perl
79       itself.
80
81       The latest version of this software should be available from my home‐
82       page: http://www.pjcj.net
83
84
85
86perl v5.8.8                       2007-01-10               Devel::Cover::DB(3)
Impressum