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

BUGS

67       Huh?
68

VERSION

70       Version 0.65 - 8th August 2009
71

LICENCE

73       Copyright 2001-2009, Paul Johnson (pjcj@cpan.org)
74
75       This software is free.  It is licensed under the same terms as Perl
76       itself.
77
78       The latest version of this software should be available from my
79       homepage: http://www.pjcj.net
80
81
82
83perl v5.10.1                      2009-08-08               Devel::Cover::DB(3)
Impressum