Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 37 lines (29 sloc) 0.934 kb
d71d090c » pjcj
2012-05-23 Add cpanmcover script.
1 #!/usr/bin/perl
2
3 # Copyright 2012, Paul Johnson (paul@pjcj.net)
4
5 # This software is free. It is licensed under the same terms as Perl itself.
6
7 # The latest version of this software should be available from my homepage:
8 # http://www.pjcj.net
9
10 use strict;
11 use warnings;
12
13 my $moddir = glob "~/.cpanm/work";
14 my $covdir = glob "~/cpancover";
15 my $lnkdir = "$covdir/modules";
16 my $resdir = "$covdir/results";
17
18 mkdir $covdir, 0750 unless -d $covdir;
19 mkdir $lnkdir, 0750 unless -d $lnkdir;
20 mkdir $resdir, 0750 unless -d $resdir;
21
22 for my $d (grep -d, <$moddir/*/*>)
23 {
24 print "Linking $d\n";
25 my ($e) = $d =~ m|/([^/]+)$| or die "Can't find module name";
26 my $new = "$lnkdir/$e";
27 unlink $new if -e $new;
28 symlink $d => $new;
29 }
30
31 my $c;
32 $c .= "cpancover -directory $lnkdir -outputdir $covdir/results ";
33 $c .= "-outputfile index.html -report html_basic";
34 # $c .= " -force";
35 # $c .= " -redo_html";
36 print "running [$c]\n";
37 system $c;
Something went wrong with that request. Please try again.