This file is indexed.

/usr/bin/cpancover is in libdevel-cover-perl 1.17-1+b2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
#!/usr/bin/perl

eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}'
    if 0; # not running under some shell

# Copyright 2002-2014, Paul Johnson (paul@pjcj.net)

# This software is free.  It is licensed under the same terms as Perl itself.

# The latest version of this software should be available from my homepage:
# http://www.pjcj.net

use 5.16.0;
use warnings;

our $VERSION = '1.17'; # VERSION

use Devel::Cover::Collection;

use Cwd qw( abs_path cwd );
use Fcntl ":flock";
use Getopt::Long;
use Pod::Usage;

# use Carp; $SIG{__DIE__} = \&Carp::confess;

$|++;

my $Options = {
    bin_dir         => abs_path($0) =~ s|/cpancover$||r,
    build           => 1,
    docker          => "docker",
    force           => 0,
    generate_html   => 0,
    latest          => 0,
    local           => 0,
    local_build     => 0,
    module          => [],
    output_file     => "index.html",
    report          => "html_basic",
    results_dir     => cwd(),
    timeout         => 1800,  # half an hour
    verbose         => 0,
    workers         => 0,
};

sub get_options {
    die "Bad option" unless GetOptions($Options, qw(
        bin_dir=s
        build!
        docker=s
        force!
        generate_html!
        help|h!
        info|i!
        latest!
        local!
        local_build!
        module_file=s
        module=s
        output_file=s
        report=s
        results_dir=s
        timeout=i
        verbose!
        version|v!
        workers=i
    ));

    say "$0 version " . __PACKAGE__->VERSION and exit 0 if $Options->{version};
    pod2usage(-exitval => 0, -verbose => 0)             if $Options->{help};
    pod2usage(-exitval => 0, -verbose => 2)             if $Options->{info};
}

sub newcp {
    my $self = shift;
    Devel::Cover::Collection->new(
        bin_dir         => $Options->{bin_dir},
        docker          => $Options->{docker},
        force           => $Options->{force},
        local           => $Options->{local},
        modules         => $Options->{module},
        output_file     => $Options->{output_file},
        report          => $Options->{report},
        results_dir     => $Options->{results_dir},
        timeout         => $Options->{timeout},
        verbose         => $Options->{verbose},
        workers         => $Options->{workers},
    )
}

sub main {
    # TODO - only one instance should run at a time
    get_options;

    if ($Options->{latest}) {
        my $cp = newcp;
        $cp->get_latest;
        return;
    }

    if ($Options->{local_build}) {
        my $cp = newcp;
        $cp->set_modules(@ARGV);
        $cp->local_build;
        return;
    }

    if ($Options->{module_file}) {
        my $cp = newcp;
        $cp->set_module_file($Options->{module_file});
        $cp->cover_modules;
    }

    if ($Options->{build}) {
        if (@ARGV) {
            my $cp = newcp;
            $cp->set_modules(@ARGV);
            $cp->cover_modules;
        } elsif (! -t STDIN) {
            my @modules;
            while (<>) {
                chomp;
                push @modules, split;
            }
            my $cp = newcp;
            $cp->set_modules(@modules);
            $cp->cover_modules;
        } else {
            my $cp = newcp;
            $cp->cover_modules;
        }
    }

    if ($Options->{generate_html}) {
        my $cp = newcp;
        $cp->generate_html;
    }

}

main

__END__

=head1 NAME

cpancover - report coverage statistics on CPAN modules

=head1 VERSION

version 1.17

=head1 SYNOPSIS

 cpancover -help -info -version
           -collect -redo_cpancover_html -redo_html -force
           -module module_name
           -results_dir /path/to/dir
           -outputdir /path/to/dir
           -outputfile filename.html
           -report report_name
           -local

=head1 DESCRIPTION


=head1 OPTIONS

The following command line options are supported:

 -h -help              - show help
 -i -info              - show documentation
 -v -version           - show version
 -collect              - collect coverage from modules       (on)
 -directory            - location of the modules             ($cwd)
 -force                - recollect coverage                  (off)
 -module               - modules to use                      (all in $directory)
 -outputdir            - where to store output               ($directory)
 -outputfile           - top level index                     (coverage.html)
 -redo_cpancover_html  - don't set default modules           (off)
 -redo_html            - force html generation for modules   (off)
 -report               - report to use                       (html_basic)
 -local                - use local (uninstalled) code        (off)

=head1 DETAILS


=head1 REQUIREMENTS

Collect coverage for results and create html, csv and json output.

The modules L<Template> and L<Parallel::Iterator> are required.

=head1 EXIT STATUS

The following exit values are returned:

0   All operations were completed successfully.

>0  An error occurred.

=head1 SEE ALSO

 L<Devel::Cover>

=head1 BUGS

 Incomplete.
 Undocumented.
 Needs to be redone properly.

=head1 LICENCE

Copyright 2002-2014, Paul Johnson (paul@pjcj.net)

This software is free.  It is licensed under the same terms as Perl itself.

The latest version of this software should be available from my homepage:
http://www.pjcj.net

=cut