|
Server IP : 127.0.0.1 / Your IP : 127.0.0.1 Web Server : Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.6.3 System : Windows NT WIN-R7LTCC7BPLI 6.3 build 9200 (Windows Server 2012 R2 Datacenter Edition) i586 User : GerbangSIPAD ( 0) PHP Version : 5.6.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF Directory (0777) : C:/xampp8.1/perl/bin/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
#!perl -w
# Run this to get a coverage analysis of the embedded documentation
use Pod::Coverage;
use lib 'lib'; # to test distribution inside './lib'
use strict;
print "Pod coverage analysis v1.00 (C) by Tels 2001.\n";
print "Using Pod::Coverage v$Pod::Coverage::VERSION\n\n";
print scalar localtime()," Starting analysis:\n\n";
my $covered = 0; my $uncovered; my $count = 0; my $c;
open FILE, 'MANIFEST' or die "Can't read MANIFEST: $!";
while (<FILE>)
{
chomp;
my ($file) = split /[\s\t]/,$_;
next unless $file =~ /^lib.*\.pm$/;
$file =~ s/^lib\///; # remove lib and .pm
$file =~ s/\.pm$//;
$file =~ s/\//::/g; # / => ::
my $rc = Pod::Coverage->new( package => $file );
$covered += $rc->covered();
$uncovered += $rc->uncovered();
$count ++;
$c = $rc->coverage() || 0;
$c = int($c * 10000)/100;
print "$file has a doc coverage of $c%.\n";
my @naked = $rc->naked();
if (@naked > 0)
{
print "Uncovered routines are:\n";
print " ",join("\n ",sort @naked),"\n"; # sort by name
# could sort by line_num
}
print "\n";
}
my $total = $covered+$uncovered;
my $average = 'unknown';
$average = int(10000*$covered/$total)/100 if $total > 0;
print "Summary:\n";
print " sub routines total : $total\n";
print " sub routines covered : $covered\n";
print " sub routines uncovered: $uncovered\n";
print " total coverage : $average%\n\n";