Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

import Devel::Cover 0.26

  • Loading branch information...
commit 69e20fb9e4bdd814e888859032e7a2db9193b679 1 parent ebc643f
@pjcj authored
Showing with 114 additions and 92 deletions.
  1. +4 −0 CHANGES
  2. +1 −1  META.yml
  3. +2 −2 Makefile.PL
  4. +4 −3 cover
  5. +5 −5 cpancover
  6. +2 −2 create_gold
  7. +3 −3 gcov2perl
  8. +10 −6 lib/Devel/Cover.pm
  9. +2 −2 lib/Devel/Cover/Branch.pm
  10. +2 −2 lib/Devel/Cover/Condition.pm
  11. +2 −2 lib/Devel/Cover/Condition_and_3.pm
  12. +2 −2 lib/Devel/Cover/Condition_or_2.pm
  13. +2 −2 lib/Devel/Cover/Condition_or_3.pm
  14. +2 −2 lib/Devel/Cover/Condition_xor_4.pm
  15. +13 −13 lib/Devel/Cover/Criterion.pm
  16. +4 −4 lib/Devel/Cover/DB.pm
  17. +3 −3 lib/Devel/Cover/DB/File.pm
  18. +1 −1  lib/Devel/Cover/Op.pm
  19. +2 −2 lib/Devel/Cover/Pod.pm
  20. +3 −3 lib/Devel/Cover/Report/Html.pm
  21. +5 −5 lib/Devel/Cover/Report/Html_basic.pm
  22. +22 −11 lib/Devel/Cover/Report/Html_subtle.pm
  23. +3 −3 lib/Devel/Cover/Report/Text.pm
  24. +2 −2 lib/Devel/Cover/Report/Text2.pm
  25. +2 −2 lib/Devel/Cover/Statement.pm
  26. +2 −2 lib/Devel/Cover/Subroutine.pm
  27. +2 −2 lib/Devel/Cover/Test.pm
  28. +2 −2 lib/Devel/Cover/Time.pm
  29. +4 −2 lib/Devel/Cover/Truth_Table.pm
  30. +1 −1  lib/Devel/Cover/Tutorial.pod
View
4 CHANGES
@@ -149,3 +149,7 @@ Release 0.24 - 10th October 2003
Release 0.25 - 10th October 2003
- Fix for perl 5.6.1. Cwd::abs_path($d) gets upset if $d doesn't exist.
- Start of some changes to cpancover HTML.
+
+Release 0.26 - 12th October 2003
+ - Decline to output HTML results for conditions containing > 16 terms.
+ - Add titles to HTML output.
View
2  META.yml
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Devel-Cover
-version: 0.25
+version: 0.26
version_from:
installdirs: site
requires:
View
4 Makefile.PL
@@ -19,8 +19,8 @@ use ExtUtils::Manifest "maniread";
$| = 1;
-my $Version = "0.25";
-my $Date = "10th October 2003";
+my $Version = "0.26";
+my $Date = "12th October 2003";
my $Author = 'pjcj@cpan.org';
my @perlbug = ("perlbug", "-a", $Author,
View
7 cover
@@ -12,9 +12,9 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
-use Devel::Cover::DB 0.25;
+use Devel::Cover::DB 0.26;
use Getopt::Long;
@@ -32,6 +32,7 @@ my $Options =
sub get_options
{
+ @ARGV = qw( -report html ) unless @ARGV;
die "Bad option" unless
GetOptions($Options, # Store the options in the Options hash.
"write:s" => sub
@@ -202,7 +203,7 @@ See the BUGS file.
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
10 cpancover
@@ -12,9 +12,9 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
-use Devel::Cover::DB 0.25;
+use Devel::Cover::DB 0.26;
use Cwd ();
use File::Find ();
@@ -309,7 +309,7 @@ package Devel::Cover::Cpancover::Template::Provider;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
use base "Template::Provider";
@@ -345,7 +345,7 @@ $Templates{html} = <<'EOT';
<!--
-This file was generated by Devel::Cover Version 0.25
+This file was generated by Devel::Cover Version 0.26
Devel::Cover is copyright 2001-2003, Paul Johnson (pjcj@cpan.org)
@@ -454,7 +454,7 @@ The following exit values are returned:
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
4 create_gold
@@ -12,11 +12,11 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
use blib;
-use Devel::Cover::Test 0.25;
+use Devel::Cover::Test 0.26;
my @tests = @ARGV;
View
6 gcov2perl
@@ -12,9 +12,9 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
-use Devel::Cover::DB 0.25;
+use Devel::Cover::DB 0.26;
use Getopt::Long;
use Pod::Usage;
@@ -128,7 +128,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
16 lib/Devel/Cover.pm
@@ -11,12 +11,12 @@ use strict;
use warnings;
our @ISA = qw( DynaLoader );
-our $VERSION = "0.25";
+our $VERSION = "0.26";
use DynaLoader ();
-use Devel::Cover::DB 0.25;
-use Devel::Cover::Inc 0.25;
+use Devel::Cover::DB 0.26;
+use Devel::Cover::Inc 0.26;
use B qw( class ppname main_cv main_start main_root walksymtable OPf_KIDS );
use B::Debug;
@@ -694,7 +694,7 @@ Devel::Cover - Code coverage metrics for Perl
=head1 SYNOPSIS
perl -MDevel::Cover yourprog args
- cover cover_db -report html
+ cover
perl -MDevel::Cover=-db,cover_db,-coverage,statement,time yourprog args
@@ -702,7 +702,11 @@ Devel::Cover - Code coverage metrics for Perl
cover -delete
HARNESS_PERL_SWITCHES=-MDevel::Cover make test
- cover -report html
+ cover
+
+ If the module does not use the t/*.t framework:
+
+ PERL5OPT=-MDevel::Cover make test
=head1 DESCRIPTION
@@ -784,7 +788,7 @@ See the BUGS file.
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
4 lib/Devel/Cover/Branch.pm
@@ -10,7 +10,7 @@ package Devel::Cover::Branch;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
use base "Devel::Cover::Criterion";
@@ -76,7 +76,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
4 lib/Devel/Cover/Condition.pm
@@ -10,7 +10,7 @@ package Devel::Cover::Condition;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
use base "Devel::Cover::Criterion";
@@ -80,7 +80,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
4 lib/Devel/Cover/Condition_and_3.pm
@@ -10,7 +10,7 @@ package Devel::Cover::Condition_and_3;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
use base "Devel::Cover::Condition";
@@ -46,7 +46,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
4 lib/Devel/Cover/Condition_or_2.pm
@@ -10,7 +10,7 @@ package Devel::Cover::Condition_or_2;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
use base "Devel::Cover::Condition";
@@ -46,7 +46,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
4 lib/Devel/Cover/Condition_or_3.pm
@@ -10,7 +10,7 @@ package Devel::Cover::Condition_or_3;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
use base "Devel::Cover::Condition";
@@ -46,7 +46,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
4 lib/Devel/Cover/Condition_xor_4.pm
@@ -10,7 +10,7 @@ package Devel::Cover::Condition_xor_4;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
use base "Devel::Cover::Condition";
@@ -45,7 +45,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
26 lib/Devel/Cover/Criterion.pm
@@ -10,18 +10,18 @@ package Devel::Cover::Criterion;
use strict;
use warnings;
-our $VERSION = "0.25";
-
-use Devel::Cover::Statement 0.25;
-use Devel::Cover::Branch 0.25;
-use Devel::Cover::Condition 0.25;
-use Devel::Cover::Condition_or_2 0.25;
-use Devel::Cover::Condition_or_3 0.25;
-use Devel::Cover::Condition_and_3 0.25;
-use Devel::Cover::Condition_xor_4 0.25;
-use Devel::Cover::Subroutine 0.25;
-use Devel::Cover::Time 0.25;
-use Devel::Cover::Pod 0.25;
+our $VERSION = "0.26";
+
+use Devel::Cover::Statement 0.26;
+use Devel::Cover::Branch 0.26;
+use Devel::Cover::Condition 0.26;
+use Devel::Cover::Condition_or_2 0.26;
+use Devel::Cover::Condition_or_3 0.26;
+use Devel::Cover::Condition_and_3 0.26;
+use Devel::Cover::Condition_xor_4 0.26;
+use Devel::Cover::Subroutine 0.26;
+use Devel::Cover::Time 0.26;
+use Devel::Cover::Pod 0.26;
sub new
{
@@ -79,7 +79,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
8 lib/Devel/Cover/DB.pm
@@ -10,10 +10,10 @@ package Devel::Cover::DB;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
-use Devel::Cover::DB::File 0.25;
-use Devel::Cover::Criterion 0.25;
+use Devel::Cover::DB::File 0.26;
+use Devel::Cover::Criterion 0.26;
use Carp;
use Data::Dumper;
@@ -561,7 +561,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
6 lib/Devel/Cover/DB/File.pm
@@ -10,9 +10,9 @@ package Devel::Cover::DB::File;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
-use Devel::Cover::Criterion 0.25;
+use Devel::Cover::Criterion 0.26;
sub calculate_summary
{
@@ -78,7 +78,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
2  lib/Devel/Cover/Op.pm
@@ -10,7 +10,7 @@ package Devel::Cover::Op;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
use Devel::Cover qw( -ignore blib -ignore \\wB\\w -indent 1 );
use B::Concise qw( set_style add_callback );
View
4 lib/Devel/Cover/Pod.pm
@@ -10,7 +10,7 @@ package Devel::Cover::Pod;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
use base "Devel::Cover::Criterion";
@@ -72,7 +72,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
6 lib/Devel/Cover/Report/Html.pm
@@ -10,9 +10,9 @@ package Devel::Cover::Report::Html;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
-use Devel::Cover::Report::Html_subtle 0.25;
+use Devel::Cover::Report::Html_subtle 0.26;
sub report
{
@@ -52,7 +52,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
10 lib/Devel/Cover/Report/Html_basic.pm
@@ -10,9 +10,9 @@ package Devel::Cover::Report::Html_basic;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
-use Devel::Cover::DB 0.25;
+use Devel::Cover::DB 0.26;
use Cwd ();
use Template 2.00;
@@ -280,7 +280,7 @@ package Devel::Cover::Report::Html_basic::Template::Provider;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
use base "Template::Provider";
@@ -316,7 +316,7 @@ $Templates{html} = <<'EOT';
<!--
-This file was generated by Devel::Cover Version 0.25
+This file was generated by Devel::Cover Version 0.26
Devel::Cover is copyright 2001-2002, Paul Johnson (pjcj@cpan.org)
@@ -535,7 +535,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
33 lib/Devel/Cover/Report/Html_subtle.pm
@@ -2,10 +2,10 @@ package Devel::Cover::Report::Html_subtle;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
-use Devel::Cover::DB 0.25;
-use Devel::Cover::Truth_Table 0.25;
+use Devel::Cover::DB 0.26;
+use Devel::Cover::Truth_Table 0.26;
use Cwd();
use Template 2.00;
@@ -83,6 +83,9 @@ sub print_summary {
$vals{$file}{$criterion}{link} = "$Filenames{$file}--subroutine.html";
}
}
+ my $c = $part->{$criterion};
+ $vals{$file}{$criterion}{details} =
+ ($c->{covered} || 0) . " / " . ($c->{total} || 0);
}
$vals{$file}{$criterion}{pc} = $pc;
}
@@ -173,11 +176,18 @@ sub print_file {
elsif ($c eq 'condition') {
my @tt = $file_data->condition->truth_table($.);
my @p;
- foreach (@tt) {
- push @p, {text => sprintf("%.0f", $_->[0]->percentage),
- class => cvg_class($_->[0]->percentage),
- link => "$Filenames{$file}--condition.html#line$."};
+ if (@tt)
+ {
+ foreach (@tt) {
+ push @p, {text => sprintf("%.0f", $_->[0]->percentage),
+ class => cvg_class($_->[0]->percentage),
+ link => "$Filenames{$file}--condition.html#line$."};
+ }
}
+ else
+ {
+ push @p, { text => "expression contains > 16 terms: ignored" };
+ }
push @{$line{metrics}}, \@p;
}
elsif ($c eq 'subroutine') {
@@ -378,7 +388,7 @@ package Devel::Cover::Report::Html_subtle::Template::Provider;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
use base "Template::Provider";
@@ -396,7 +406,7 @@ sub fetch {
$Templates{html} = <<'EOT';
<!--
-This file was generated by Devel::Cover Version 0.25
+This file was generated by Devel::Cover Version 0.26
Devel::Cover is copyright 2001-2002, Paul Johnson (pjcj@cpan.org)
@@ -456,7 +466,8 @@ $Templates{summary} = <<'EOT';
[% FOREACH criterion = showing %]
[% IF vals.$file.$criterion.class %]
- <td class="[%- vals.$file.$criterion.class -%]">
+ <td class="[%- vals.$file.$criterion.class -%]"
+ title="[%- vals.$file.$criterion.details -%]">
[% ELSE %]
<td>
[% END %]
@@ -722,7 +733,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
6 lib/Devel/Cover/Report/Text.pm
@@ -10,9 +10,9 @@ package Devel::Cover::Report::Text;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
-use Devel::Cover::DB 0.25;
+use Devel::Cover::DB 0.26;
sub print_file
{
@@ -263,7 +263,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
4 lib/Devel/Cover/Report/Text2.pm
@@ -4,7 +4,7 @@ use warnings;
our $VERSION = '0.20';
-use Devel::Cover::DB 0.25;
+use Devel::Cover::DB 0.26;
use Devel::Cover::Truth_Table;
my %format = (
@@ -191,7 +191,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
4 lib/Devel/Cover/Statement.pm
@@ -10,7 +10,7 @@ package Devel::Cover::Statement;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
use base "Devel::Cover::Criterion";
@@ -68,7 +68,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
4 lib/Devel/Cover/Subroutine.pm
@@ -10,7 +10,7 @@ package Devel::Cover::Subroutine;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
use base "Devel::Cover::Criterion";
@@ -69,7 +69,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
4 lib/Devel/Cover/Test.pm
@@ -10,14 +10,14 @@ package Devel::Cover::Test;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
use Carp;
use File::Spec;
use Test;
-use Devel::Cover::Inc 0.25;
+use Devel::Cover::Inc 0.26;
sub new
{
View
4 lib/Devel/Cover/Time.pm
@@ -10,7 +10,7 @@ package Devel::Cover::Time;
use strict;
use warnings;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
use base "Devel::Cover::Criterion";
@@ -69,7 +69,7 @@ Huh?
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
View
6 lib/Devel/Cover/Truth_Table.pm
@@ -48,6 +48,8 @@ sub truth_table {
my $line = shift;
my $c = $self->get($line);
+ return if @$c > 16; # Too big - can't get any useful info anyway.
+
my @lops;
foreach my $c (@$c) {
my $op = $c->[1]{type};
@@ -171,7 +173,7 @@ sub covered {
package Devel::Cover::Truth_Table;
use warnings;
use strict;
-our $VERSION = "0.25";
+our $VERSION = "0.26";
#-------------------------------------------------------------------------------
# Subroutine : new()
@@ -555,7 +557,7 @@ None that I'm aware of...
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENSE
View
2  lib/Devel/Cover/Tutorial.pod
@@ -163,7 +163,7 @@ basis for future research.
=head1 VERSION
-Version 0.25 - 10th October 2003
+Version 0.26 - 12th October 2003
=head1 LICENCE
Please sign in to comment.
Something went wrong with that request. Please try again.