Permalink
Browse files

import Devel::Cover 0.38

  • Loading branch information...
1 parent 97a1ccc commit 32cd54540dde71e775b0c78dc061e616647052b1 @pjcj committed Nov 3, 2004
Showing with 390 additions and 235 deletions.
  1. +10 −1 CHANGES
  2. +3 −0 MANIFEST
  3. +1 −1 META.yml
  4. +2 −2 Makefile.PL
  5. +0 −2 TODO
  6. +3 −3 cover
  7. +5 −5 cpancover
  8. +2 −2 create_gold
  9. +7 −12 gcov2perl
  10. +8 −5 lib/Devel/Cover.pm
  11. +2 −2 lib/Devel/Cover/Branch.pm
  12. +2 −2 lib/Devel/Cover/Condition.pm
  13. +2 −2 lib/Devel/Cover/Condition_and_3.pm
  14. +2 −2 lib/Devel/Cover/Condition_or_2.pm
  15. +2 −2 lib/Devel/Cover/Condition_or_3.pm
  16. +2 −2 lib/Devel/Cover/Condition_xor_4.pm
  17. +13 −13 lib/Devel/Cover/Criterion.pm
  18. +5 −5 lib/Devel/Cover/DB.pm
  19. +3 −3 lib/Devel/Cover/DB/File.pm
  20. +3 −3 lib/Devel/Cover/Op.pm
  21. +2 −2 lib/Devel/Cover/Pod.pm
  22. +2 −2 lib/Devel/Cover/Report/Html.pm
  23. +5 −5 lib/Devel/Cover/Report/Html_basic.pm
  24. +26 −17 lib/Devel/Cover/Report/Html_minimal.pm
  25. +6 −6 lib/Devel/Cover/Report/Html_subtle.pm
  26. +3 −3 lib/Devel/Cover/Report/Text.pm
  27. +3 −3 lib/Devel/Cover/Report/Text2.pm
  28. +2 −2 lib/Devel/Cover/Statement.pm
  29. +2 −2 lib/Devel/Cover/Subroutine.pm
  30. +5 −2 lib/Devel/Cover/Test.pm
  31. +2 −2 lib/Devel/Cover/Time.pm
  32. +2 −2 lib/Devel/Cover/Truth_Table.pm
  33. +1 −1 lib/Devel/Cover/Tutorial.pod
  34. +3 −3 test_output/cover/alias.5.006001
  35. +4 −4 test_output/cover/alias1.5.006001
  36. +3 −3 test_output/cover/branch_return_sub.5.006001
  37. +3 −3 test_output/cover/cond_and.5.006001
  38. +3 −3 test_output/cover/cond_and.5.008001
  39. +3 −3 test_output/cover/cond_branch.5.006001
  40. +3 −3 test_output/cover/cond_branch.5.008001
  41. +3 −3 test_output/cover/cond_or.5.006001
  42. +3 −3 test_output/cover/cond_or.5.008001
  43. +3 −3 test_output/cover/cond_xor.5.006001
  44. +3 −3 test_output/cover/cond_xor.5.008001
  45. +58 −0 test_output/cover/default_param.5.006001
  46. +57 −0 test_output/cover/default_param.5.008001
  47. +3 −3 test_output/cover/destroy.5.006001
  48. +3 −3 test_output/cover/dynamic_subs.5.006001
  49. +3 −3 test_output/cover/dynamic_subs.5.008001
  50. +3 −3 test_output/cover/dynamic_subs.5.009
  51. +3 −3 test_output/cover/eval1.5.006001
  52. +3 −3 test_output/cover/fork.5.006001
  53. +3 −3 test_output/cover/if.5.006001
  54. +4 −4 test_output/cover/module1.5.006001
  55. +4 −4 test_output/cover/module1.5.008001
  56. +4 −4 test_output/cover/module2.5.006001
  57. +4 −4 test_output/cover/module2.5.008001
  58. +3 −3 test_output/cover/module_import.5.006001
  59. +4 −4 test_output/cover/module_import.5.008
  60. +3 −3 test_output/cover/module_import.5.008001
  61. +3 −3 test_output/cover/overloaded.5.006001
  62. +3 −3 test_output/cover/pod.5.006001
  63. +3 −3 test_output/cover/skip.5.006001
  64. +3 −3 test_output/cover/special_blocks.5.006001
  65. +3 −3 test_output/cover/statement.5.006001
  66. +3 −3 test_output/cover/t0.5.006001
  67. +3 −3 test_output/cover/t0.5.008001
  68. +3 −3 test_output/cover/t1.5.006001
  69. +3 −3 test_output/cover/t2.5.006001
  70. +3 −3 test_output/cover/t2.5.008001
  71. +4 −4 test_output/cover/trivial.5.006001
  72. +20 −0 tests/default_param
  73. +2 −2 tests/md5.t
View
11 CHANGES
@@ -201,7 +201,7 @@ Release 0.33 - 13th January 2004
- Add if test.
- Ensure runs are merged in the order they were created.
- Don't report multiple data from dynamically created subs.
- - Add dynamic_subs test.
+ - Add alias, alias1 and dynamic_subs tests.
- Fix and document Devel::Cover::Op.
- Redo subroutine coverage so anon subs are covered correctly in 5.6.x.
@@ -239,3 +239,12 @@ Release 0.36 - 9th March 2004
Release 0.37 - 10th March 2004
- Fix up pod test golden results.
- Add limitation documentation (Michael Carman).
+
+Release 0.38 - 12th March 2004
+ - Allow coverage summary title to be changed (David Wheeler).
+ - More care generating pod golden results.
+ - Small Devel::Cover::Op output fix.
+ - Handle "my $x = shift || []" and friends nicely.
+ - Add default_param test.
+ - Provide summary output to one decimal place.
+ - Update gcov2perl.
View
3 MANIFEST
@@ -43,6 +43,7 @@ tests/cond_and
tests/cond_branch
tests/cond_or
tests/cond_xor
+tests/default_param
tests/destroy
tests/dynamic_subs
tests/eval1
@@ -76,6 +77,8 @@ test_output/cover/cond_or.5.006001
test_output/cover/cond_or.5.008001
test_output/cover/cond_xor.5.006001
test_output/cover/cond_xor.5.008001
+test_output/cover/default_param.5.006001
+test_output/cover/default_param.5.008001
test_output/cover/destroy.5.006001
test_output/cover/dynamic_subs.5.006001
test_output/cover/dynamic_subs.5.008001
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.37
+version: 0.38
version_from:
installdirs: site
requires:
View
4 Makefile.PL
@@ -19,8 +19,8 @@ use File::Copy;
$| = 1;
-my $Version = "0.37";
-my $Date = "10th March 2004";
+my $Version = "0.38";
+my $Date = "12th March 2004";
my $Author = 'pjcj@cpan.org';
my @perlbug = ("perlbug", "-a", $Author,
View
2 TODO
@@ -2,7 +2,6 @@
- Collect data for path coverage.
- Tests.
- Functional tests.
- - md5 tests.
- Documentation.
- Profiling and speedups.
- BEGIN and END blocks.
@@ -24,4 +23,3 @@
- Threads support.
- Test analysis.
- Move HTML version and platform info to main page and allow for multiples.
-- Handle "my $x = shift || []" nicely.
View
6 cover
@@ -12,9 +12,9 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
-use Devel::Cover::DB 0.37;
+use Devel::Cover::DB 0.38;
use Cwd "abs_path";
use Data::Dumper;
@@ -259,7 +259,7 @@ See the BUGS file.
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENCE
View
10 cpancover
@@ -12,9 +12,9 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
-use Devel::Cover::DB 0.37;
+use Devel::Cover::DB 0.38;
use Cwd ();
use File::Find ();
@@ -314,7 +314,7 @@ package Devel::Cover::Cpancover::Template::Provider;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
use base "Template::Provider";
@@ -350,7 +350,7 @@ $Templates{html} = <<'EOT';
<!--
-This file was generated by Devel::Cover Version 0.37
+This file was generated by Devel::Cover Version 0.38
Devel::Cover is copyright 2001-2004, Paul Johnson (pjcj@cpan.org)
@@ -459,7 +459,7 @@ The following exit values are returned:
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENCE
View
4 create_gold
@@ -12,11 +12,11 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
use blib;
-use Devel::Cover::Test 0.37;
+use Devel::Cover::Test 0.38;
my @tests = @ARGV;
View
19 gcov2perl
@@ -12,17 +12,16 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
-use Devel::Cover::DB 0.37;
+use Devel::Cover::DB 0.38;
use Getopt::Long;
use Pod::Usage;
my $Options =
{
db => "cover_db",
- indent => 0,
merge => 1,
};
@@ -33,7 +32,6 @@ sub get_options
qw(
db=s
help|h!
- indent=i
info|i!
merge!
version|v!
@@ -78,7 +76,6 @@ sub main
eval { $existing = Devel::Cover::DB->new(db => $Options->{db})
if $Options->{merge} };
$db->merge($existing) if $existing;
- $db->indent($Options->{indent});
$db->write($Options->{db});
}
@@ -92,7 +89,7 @@ gcov2perl - convert gcov files to Devel::Cover databases
=head1 SYNOPSIS
- gcov2perl -h -i -v -db database -merge -indent gcov_files
+ gcov2perl -h -i -v -db database -merge gcov_files
=head1 DESCRIPTION
@@ -104,7 +101,6 @@ The following command line options are supported:
-db database - specify the database to use
-merge - merge results with the current database
- -indent - Data::Dumper indent level to use
-h -help - show help
-i -info - show documentation
@@ -114,21 +110,20 @@ The following command line options are supported:
The following exit values are returned:
-0 All files converted successfully
-
->0 An error occurred.
+ 0 All files converted successfully
+ >0 An error occurred.
=head1 SEE ALSO
- Dvel::Cover
+ Devel::Cover
=head1 BUGS
Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENCE
View
13 lib/Devel/Cover.pm
@@ -10,13 +10,13 @@ package Devel::Cover;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
use DynaLoader ();
our @ISA = qw( DynaLoader );
-use Devel::Cover::DB 0.37;
-use Devel::Cover::Inc 0.37;
+use Devel::Cover::DB 0.38;
+use Devel::Cover::Inc 0.38;
use B qw( class ppname main_cv main_start main_root walksymtable OPf_KIDS );
use B::Debug;
@@ -112,6 +112,8 @@ EOM
"Ignoring packages in:", join("\n ", "", @Inc), "\n"
unless $Silent;
+ $Meta{OS} = $^O;
+ $Meta{perl} = join ".", map ord, split //, $^V;
$Meta{run} = $0;
$Meta{start} = get_elapsed();
}
@@ -536,7 +538,8 @@ sub add_condition_cover
if ($type eq "or")
{
- if ($op->first->sibling->name eq "const")
+ my $name = $op->first->sibling->name;
+ if ($name eq "const" || $name eq "srefgen")
{
$c = [ $c->[3], $c->[1] + $c->[2] ];
$count = 2;
@@ -984,7 +987,7 @@ See the BUGS file.
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENCE
View
4 lib/Devel/Cover/Branch.pm
@@ -10,7 +10,7 @@ package Devel::Cover::Branch;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
use base "Devel::Cover::Criterion";
@@ -76,7 +76,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENCE
View
4 lib/Devel/Cover/Condition.pm
@@ -10,7 +10,7 @@ package Devel::Cover::Condition;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
use base "Devel::Cover::Criterion";
@@ -80,7 +80,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=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.37";
+our $VERSION = "0.38";
use base "Devel::Cover::Condition";
@@ -46,7 +46,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=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.37";
+our $VERSION = "0.38";
use base "Devel::Cover::Condition";
@@ -46,7 +46,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=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.37";
+our $VERSION = "0.38";
use base "Devel::Cover::Condition";
@@ -46,7 +46,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=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.37";
+our $VERSION = "0.38";
use base "Devel::Cover::Condition";
@@ -45,7 +45,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENCE
View
26 lib/Devel/Cover/Criterion.pm
@@ -10,18 +10,18 @@ package Devel::Cover::Criterion;
use strict;
use warnings;
-our $VERSION = "0.37";
-
-use Devel::Cover::Statement 0.37;
-use Devel::Cover::Branch 0.37;
-use Devel::Cover::Condition 0.37;
-use Devel::Cover::Condition_or_2 0.37;
-use Devel::Cover::Condition_or_3 0.37;
-use Devel::Cover::Condition_and_3 0.37;
-use Devel::Cover::Condition_xor_4 0.37;
-use Devel::Cover::Subroutine 0.37;
-use Devel::Cover::Time 0.37;
-use Devel::Cover::Pod 0.37;
+our $VERSION = "0.38";
+
+use Devel::Cover::Statement 0.38;
+use Devel::Cover::Branch 0.38;
+use Devel::Cover::Condition 0.38;
+use Devel::Cover::Condition_or_2 0.38;
+use Devel::Cover::Condition_or_3 0.38;
+use Devel::Cover::Condition_and_3 0.38;
+use Devel::Cover::Condition_xor_4 0.38;
+use Devel::Cover::Subroutine 0.38;
+use Devel::Cover::Time 0.38;
+use Devel::Cover::Pod 0.38;
sub new
{
@@ -79,7 +79,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENCE
View
10 lib/Devel/Cover/DB.pm
@@ -10,10 +10,10 @@ package Devel::Cover::DB;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
-use Devel::Cover::DB::File 0.37;
-use Devel::Cover::Criterion 0.37;
+use Devel::Cover::DB::File 0.38;
+use Devel::Cover::Criterion 0.38;
use Carp;
use File::Path;
@@ -365,7 +365,7 @@ sub print_summary
{
my ($part, $criterion) = @_;
$options{$criterion} && exists $part->{$criterion}
- ? sprintf "%5.2f", $part->{$criterion}{percentage}
+ ? sprintf "%4.1f", $part->{$criterion}{percentage}
: "n/a"
};
@@ -641,7 +641,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=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.37";
+our $VERSION = "0.38";
-use Devel::Cover::Criterion 0.37;
+use Devel::Cover::Criterion 0.38;
sub calculate_summary
{
@@ -78,7 +78,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENCE
View
6 lib/Devel/Cover/Op.pm
@@ -12,7 +12,7 @@ require 5.8.0; # My patches to B::Concise didn't get released till 5.8.0.
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
use Devel::Cover qw( -ignore blib -ignore \\wB\\w );
use B::Concise qw( set_style add_callback );
@@ -67,7 +67,7 @@ sub import
no warnings "uninitialized";
$h->{cover} = $s ? "s[$s]" :
$b ? "b[@$b]" :
- $c ? "b[@$c]" :
+ $c ? "c[@$c]" :
"";
}
else
@@ -111,7 +111,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENCE
View
4 lib/Devel/Cover/Pod.pm
@@ -10,7 +10,7 @@ package Devel::Cover::Pod;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
use base "Devel::Cover::Criterion";
@@ -72,7 +72,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENCE
View
4 lib/Devel/Cover/Report/Html.pm
@@ -10,7 +10,7 @@ package Devel::Cover::Report::Html;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
use base "Devel::Cover::Report::Html_minimal";
@@ -45,7 +45,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=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.37";
+our $VERSION = "0.38";
-use Devel::Cover::DB 0.37;
+use Devel::Cover::DB 0.38;
use Template 2.00;
@@ -278,7 +278,7 @@ package Devel::Cover::Report::Html_basic::Template::Provider;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
use base "Template::Provider";
@@ -314,7 +314,7 @@ $Templates{html} = <<'EOT';
<!--
-This file was generated by Devel::Cover Version 0.37
+This file was generated by Devel::Cover Version 0.38
Devel::Cover is copyright 2001-2002, Paul Johnson (pjcj@cpan.org)
@@ -533,7 +533,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENCE
View
43 lib/Devel/Cover/Report/Html_minimal.pm
@@ -4,10 +4,10 @@ use strict;
use warnings;
use CGI;
use Getopt::Long;
-use Devel::Cover::DB 0.37;
-use Devel::Cover::Truth_Table 0.37;
+use Devel::Cover::DB 0.38;
+use Devel::Cover::Truth_Table 0.38;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
#-------------------------------------------------------------------------------
# Subroutine : get_coverage_for_line
@@ -255,7 +255,7 @@ sub print_html_header {
print $fh <<"END_HTML";
<!--
-This file was generated by Devel::Cover Version 0.37
+This file was generated by Devel::Cover Version 0.38
Devel::Cover is copyright 2001-2004, Paul Johnson (pjcj\@cpan.org)
Devel::Cover is free. It is licensed under the same terms as Perl itself.
The latest version of Devel::Cover should be available from my homepage:
@@ -287,18 +287,21 @@ sub print_summary {
my $title = shift;
my $file = shift;
my $percent = sprintf("%.1f", shift @_);
+ my $db = shift;
my $class = pclass($percent);
- my $perlver = join('.', map {ord} split(//, $^V)); # should come from db
- my $platform = $^O; # should come from db
+
+ my $meta = $db->{meta}{$file};
+ my $start = localtime ${meta}->{start} / 1e6;
+ my $finish = localtime ${meta}->{finish} / 1e6;
print $fh <<"END_HTML";
<body>
<h1>$title</h1>
<table>
<tr><td class="h" align="right">File:</td><td align="left">$file</td></tr>
<tr><td class="h" align="right">Coverage:</td><td align="left" class="$class">$percent\%</td></tr>
-<tr><td class="h" align="right">Perl version:</td><td align="left">$perlver</td></tr>
-<tr><td class="h" align="right">Platform:</td><td align="left">$platform</td></tr>
+<tr><td class="h" align="right">Platform:</td><td align="left">$meta->{OS}</td></tr>
+<tr><td class="h" align="right">Perl version:</td><td align="left">$meta->{perl}</td></tr>
</table>
<div><br/></div>
<table>
@@ -357,10 +360,10 @@ sub print_summary_report {
my ($show, $th) = get_showing_headers($db, $options);
push @$show, 'total';
- print_html_header($fh, 'Coverage Summary');
+ print_html_header($fh, $options->{option}{summarytitle});
print $fh <<"END_HTML";
<body>
-<h1>Coverage Summary</h1>
+<h1>$options->{option}{summarytitle}</h1>
<table>
<tr><td class="h" align="right">Database:</td><td align="left">$db->{db}</td></tr>
</table>
@@ -446,7 +449,7 @@ sub print_file_report {
my $file_data = $db->cover->file($fin);
print_html_header($out, "File Coverage: $fin");
- print_summary($out, 'File Coverage', $fin, $db->{summary}{$fin}{total}{percentage});
+ print_summary($out, 'File Coverage', $fin, $db->{summary}{$fin}{total}{percentage}, $db);
print_th($out, ['line', @$th, 'code']);
while (my $sloc = <$in>) {
@@ -551,7 +554,7 @@ sub print_branch_report {
open(my $out, '>', $fout) or warn("Can't open file '$fout' [$!]\n"), return;
print_html_header($out, "Branch Coverage: $file");
- print_summary($out, 'Branch Coverage', $file, $db->{summary}{$file}{branch}{percentage});
+ print_summary($out, 'Branch Coverage', $file, $db->{summary}{$file}{branch}{percentage}, $db);
print_th($out, ['line', '%', 'coverage', 'branch'], {coverage => 2});
my $fmt = qq'<tr><td class="h">%s</td>'
@@ -591,7 +594,7 @@ sub print_condition_report {
open(my $out, '>', $fout) or warn("Can't open file '$fout' [$!]\n"), return;
print_html_header($out, "Condition Coverage: $file");
- print_summary($out, 'Condition Coverage', $file, $db->{summary}{$file}{condition}{percentage});
+ print_summary($out, 'Condition Coverage', $file, $db->{summary}{$file}{condition}{percentage}, $db);
print_th($out, ['line', '%', 'coverage', 'condition']);
my $fmt = qq'<tr><td class="h">%s</td>'
@@ -630,7 +633,7 @@ sub print_sub_report {
open(my $out, '>', $fout) or warn("Can't open file '$fout' [$!]\n"), return;
print_html_header($out, "Subroutine Coverage: $file");
- print_summary($out, 'Subroutine Coverage', $file, $db->{summary}{$file}{subroutine}{percentage});
+ print_summary($out, 'Subroutine Coverage', $file, $db->{summary}{$file}{subroutine}{percentage}, $db);
print_th($out, ['line', 'subroutine']);
my $fmt = qq'<tr><td class="h">%s</td>'
@@ -655,14 +658,16 @@ sub print_sub_report {
sub get_options
{
my ($self, $opt) = @_;
- $opt->{option}{pod} = 1;
- $opt->{option}{outputfile} = "coverage.html";
+ $opt->{option}{pod} = 1;
+ $opt->{option}{outputfile} = "coverage.html";
+ $opt->{option}{summarytitle} = "Coverage Summary";
die "Bad option" unless
GetOptions($opt->{option},
qw(
data!
outputfile=s
pod!
+ summarytitle=s
unified!
));
}
@@ -746,6 +751,10 @@ Generates a "unified" report for each file. The detailed data that normally
appears in the auxilliary reports (branch, condition, etc.) is placed in the
file report, and the auxilliarry reports are not generated.
+=item summarytitle
+
+Specify the tile of the summary. The default is "Coverage Summary".
+
=back
=head1 SEE ALSO
@@ -754,7 +763,7 @@ Devel::Cover
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENCE
View
12 lib/Devel/Cover/Report/Html_subtle.pm
@@ -2,10 +2,10 @@ package Devel::Cover::Report::Html_subtle;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
-use Devel::Cover::DB 0.37;
-use Devel::Cover::Truth_Table 0.37;
+use Devel::Cover::DB 0.38;
+use Devel::Cover::Truth_Table 0.38;
use Template 2.00;
use CGI;
@@ -386,7 +386,7 @@ package Devel::Cover::Report::Html_subtle::Template::Provider;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
use base "Template::Provider";
@@ -404,7 +404,7 @@ sub fetch {
$Templates{html} = <<'EOT';
<!--
-This file was generated by Devel::Cover Version 0.37
+This file was generated by Devel::Cover Version 0.38
Devel::Cover is copyright 2001-2002, Paul Johnson (pjcj@cpan.org)
@@ -734,7 +734,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=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.37";
+our $VERSION = "0.38";
-use Devel::Cover::DB 0.37;
+use Devel::Cover::DB 0.38;
sub print_file
{
@@ -261,7 +261,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENCE
View
6 lib/Devel/Cover/Report/Text2.pm
@@ -2,9 +2,9 @@ package Devel::Cover::Report::Text2;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
-use Devel::Cover::DB 0.37;
+use Devel::Cover::DB 0.38;
use Devel::Cover::Truth_Table;
my %format = (
@@ -191,7 +191,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENCE
View
4 lib/Devel/Cover/Statement.pm
@@ -10,7 +10,7 @@ package Devel::Cover::Statement;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
use base "Devel::Cover::Criterion";
@@ -68,7 +68,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENCE
View
4 lib/Devel/Cover/Subroutine.pm
@@ -10,7 +10,7 @@ package Devel::Cover::Subroutine;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
use base "Devel::Cover::Criterion";
@@ -69,7 +69,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENCE
View
7 lib/Devel/Cover/Test.pm
@@ -10,14 +10,14 @@ package Devel::Cover::Test;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
use Carp;
use File::Spec;
use Test;
-use Devel::Cover::Inc 0.37;
+use Devel::Cover::Inc 0.38;
sub new
{
@@ -246,6 +246,9 @@ sub create_gold
{
my $self = shift;
+ # Pod::Coverage not available on all versions, but it must be there on 5.6.1
+ return if $self->{criteria} =~ /\bpod\b/ && $] != 5.006001;
+
my $debug = $ENV{__COVER__DEBUG} || 0;
my $test_com = $self->test_command;
View
4 lib/Devel/Cover/Time.pm
@@ -10,7 +10,7 @@ package Devel::Cover::Time;
use strict;
use warnings;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
use base "Devel::Cover::Criterion";
@@ -70,7 +70,7 @@ Huh?
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENCE
View
4 lib/Devel/Cover/Truth_Table.pm
@@ -173,7 +173,7 @@ sub covered {
package Devel::Cover::Truth_Table;
use warnings;
use strict;
-our $VERSION = "0.37";
+our $VERSION = "0.38";
#-------------------------------------------------------------------------------
# Subroutine : new()
@@ -556,7 +556,7 @@ None that I'm aware of...
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENSE
View
2 lib/Devel/Cover/Tutorial.pod
@@ -163,7 +163,7 @@ basis for future research.
=head1 VERSION
-Version 0.37 - 10th March 2004
+Version 0.38 - 12th March 2004
=head1 LICENCE
View
6 test_output/cover/alias.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/alias 100.00 100.00 n/a 100.00 100.00
-Total 100.00 100.00 n/a 100.00 100.00
+tests/alias 100.0 100.0 n/a 100.0 100.0
+Total 100.0 100.0 n/a 100.0 100.0
------------------------------------------ ------ ------ ------ ------ ------
View
8 test_output/cover/alias1.5.006001
@@ -1,12 +1,12 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/Alias1.pm 100.00 100.00 n/a 100.00 100.00
-tests/alias1 100.00 n/a n/a n/a 100.00
-Total 100.00 100.00 n/a 100.00 100.00
+tests/Alias1.pm 100.0 100.0 n/a 100.0 100.0
+tests/alias1 100.0 n/a n/a n/a 100.0
+Total 100.0 100.0 n/a 100.0 100.0
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/branch_return_sub.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/branch_return_sub 100.00 100.00 100.00 100.00 100.00
-Total 100.00 100.00 100.00 100.00 100.00
+tests/branch_return_sub 100.0 100.0 100.0 100.0 100.0
+Total 100.0 100.0 100.0 100.0 100.0
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/cond_and.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/cond_and 95.24 50.00 50.00 100.00 71.74
-Total 95.24 50.00 50.00 100.00 71.74
+tests/cond_and 95.2 50.0 50.0 100.0 71.7
+Total 95.2 50.0 50.0 100.0 71.7
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/cond_and.5.008001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/cond_and 94.74 50.00 50.00 100.00 70.45
-Total 94.74 50.00 50.00 100.00 70.45
+tests/cond_and 94.7 50.0 50.0 100.0 70.5
+Total 94.7 50.0 50.0 100.0 70.5
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/cond_branch.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/cond_branch 83.80 79.35 19.12 100.00 69.88
-Total 83.80 79.35 19.12 100.00 69.88
+tests/cond_branch 83.8 79.3 19.1 100.0 69.9
+Total 83.8 79.3 19.1 100.0 69.9
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/cond_branch.5.008001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/cond_branch 87.07 79.35 19.12 100.00 70.00
-Total 87.07 79.35 19.12 100.00 70.00
+tests/cond_branch 87.1 79.3 19.1 100.0 70.0
+Total 87.1 79.3 19.1 100.0 70.0
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/cond_or.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/cond_or 95.45 50.00 43.48 n/a 66.04
-Total 95.45 50.00 43.48 n/a 66.04
+tests/cond_or 95.5 50.0 43.5 n/a 66.0
+Total 95.5 50.0 43.5 n/a 66.0
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/cond_or.5.008001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/cond_or 95.00 50.00 43.48 n/a 64.71
-Total 95.00 50.00 43.48 n/a 64.71
+tests/cond_or 95.0 50.0 43.5 n/a 64.7
+Total 95.0 50.0 43.5 n/a 64.7
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/cond_xor.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/cond_xor 100.00 n/a 66.67 n/a 82.61
-Total 100.00 n/a 66.67 n/a 82.61
+tests/cond_xor 100.0 n/a 66.7 n/a 82.6
+Total 100.0 n/a 66.7 n/a 82.6
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/cond_xor.5.008001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/cond_xor 100.00 n/a 66.67 n/a 80.95
-Total 100.00 n/a 66.67 n/a 80.95
+tests/cond_xor 100.0 n/a 66.7 n/a 81.0
+Total 100.0 n/a 66.7 n/a 81.0
------------------------------------------ ------ ------ ------ ------ ------
View
58 test_output/cover/default_param.5.006001
@@ -0,0 +1,58 @@
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt branch cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/default_param 100.0 n/a 100.0 100.0 100.0
+Total 100.0 n/a 100.0 100.0 100.0
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+tests/default_param
+
+line err stmt branch cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2004, Paul Johnson (pjcj@cpan.org)
+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 sub p
+14 {
+15 2 100 100 my $x = shift || 11;
+16 2 100 my $y = shift || [];
+17 2 100 my $z = shift || {};
+18 }
+19
+20 1 p $_, $_, $_ for 0, 1;
+ 1
+ 2
+
+
+Conditions
+----------
+
+or 2 conditions
+
+line err % l !l expr
+----- --- ------ ------ ------ ----
+15 100 1 1 shift @_ || 11
+16 100 1 1 shift @_ || []
+17 100 1 1 shift @_ || {}
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Location
+---------- ----------------------
+p tests/default_param:15
+
+
View
57 test_output/cover/default_param.5.008001
@@ -0,0 +1,57 @@
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt branch cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/default_param 100.0 n/a 100.0 100.0 100.0
+Total 100.0 n/a 100.0 100.0 100.0
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+tests/default_param
+
+line err stmt branch cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2004, Paul Johnson (pjcj@cpan.org)
+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 sub p
+14 {
+15 2 100 100 my $x = shift || 11;
+16 2 100 my $y = shift || [];
+17 2 100 my $z = shift || {};
+18 }
+19
+20 1 p $_, $_, $_ for 0, 1;
+ 1
+
+
+Conditions
+----------
+
+or 2 conditions
+
+line err % l !l expr
+----- --- ------ ------ ------ ----
+15 100 1 1 shift @_ || 11
+16 100 1 1 shift @_ || []
+17 100 1 1 shift @_ || {}
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Location
+---------- ----------------------
+p tests/default_param:15
+
+
View
6 test_output/cover/destroy.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/destroy 100.00 n/a n/a 100.00 100.00
-Total 100.00 n/a n/a 100.00 100.00
+tests/destroy 100.0 n/a n/a 100.0 100.0
+Total 100.0 n/a n/a 100.0 100.0
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/dynamic_subs.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/dynamic_subs 96.97 75.00 n/a 91.67 93.88
-Total 96.97 75.00 n/a 91.67 93.88
+tests/dynamic_subs 97.0 75.0 n/a 91.7 93.9
+Total 97.0 75.0 n/a 91.7 93.9
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/dynamic_subs.5.008001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/dynamic_subs 96.88 75.00 n/a 91.67 93.75
-Total 96.88 75.00 n/a 91.67 93.75
+tests/dynamic_subs 96.9 75.0 n/a 91.7 93.8
+Total 96.9 75.0 n/a 91.7 93.8
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/dynamic_subs.5.009
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/dynamic_subs 96.88 75.00 n/a 92.31 93.88
-Total 96.88 75.00 n/a 92.31 93.88
+tests/dynamic_subs 96.9 75.0 n/a 92.3 93.9
+Total 96.9 75.0 n/a 92.3 93.9
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/eval1.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/eval1 100.00 n/a n/a 100.00 100.00
-Total 100.00 n/a n/a 100.00 100.00
+tests/eval1 100.0 n/a n/a 100.0 100.0
+Total 100.0 n/a n/a 100.0 100.0
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/fork.5.006001
@@ -1,11 +1,11 @@
-Reading database from /var/spool/extra/g/perl/Devel-Cover-0.35/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/fork 100.00 75.00 n/a n/a 90.00
-Total 100.00 75.00 n/a n/a 90.00
+tests/fork 100.0 75.0 n/a n/a 90.0
+Total 100.0 75.0 n/a n/a 90.0
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/if.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/if 78.57 50.00 n/a n/a 66.67
-Total 78.57 50.00 n/a n/a 66.67
+tests/if 78.6 50.0 n/a n/a 66.7
+Total 78.6 50.0 n/a n/a 66.7
------------------------------------------ ------ ------ ------ ------ ------
View
8 test_output/cover/module1.5.006001
@@ -1,12 +1,12 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/Module1.pm 25.00 n/a n/a 25.00 25.00
-tests/module1 87.50 50.00 n/a 100.00 81.82
-Total 56.25 50.00 n/a 40.00 52.17
+tests/Module1.pm 25.0 n/a n/a 25.0 25.0
+tests/module1 87.5 50.0 n/a 100.0 81.8
+Total 56.2 50.0 n/a 40.0 52.2
------------------------------------------ ------ ------ ------ ------ ------
View
8 test_output/cover/module1.5.008001
@@ -1,12 +1,12 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/Module1.pm 25.00 n/a n/a 25.00 25.00
-tests/module1 85.71 50.00 n/a 100.00 80.00
-Total 53.33 50.00 n/a 40.00 50.00
+tests/Module1.pm 25.0 n/a n/a 25.0 25.0
+tests/module1 85.7 50.0 n/a 100.0 80.0
+Total 53.3 50.0 n/a 40.0 50.0
------------------------------------------ ------ ------ ------ ------ ------
View
8 test_output/cover/module2.5.006001
@@ -1,12 +1,12 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/Module2.pm 25.00 n/a n/a 25.00 25.00
-tests/module2 87.50 50.00 n/a 100.00 81.82
-Total 56.25 50.00 n/a 40.00 52.17
+tests/Module2.pm 25.0 n/a n/a 25.0 25.0
+tests/module2 87.5 50.0 n/a 100.0 81.8
+Total 56.2 50.0 n/a 40.0 52.2
------------------------------------------ ------ ------ ------ ------ ------
View
8 test_output/cover/module2.5.008001
@@ -1,12 +1,12 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/Module2.pm 25.00 n/a n/a 25.00 25.00
-tests/module2 85.71 50.00 n/a 100.00 80.00
-Total 53.33 50.00 n/a 40.00 50.00
+tests/Module2.pm 25.0 n/a n/a 25.0 25.0
+tests/module2 85.7 50.0 n/a 100.0 80.0
+Total 53.3 50.0 n/a 40.0 50.0
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/module_import.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/Module_import.pm 0.00 n/a n/a 0.00 0.00
-Total 0.00 n/a n/a 0.00 0.00
+tests/Module_import.pm 0.0 n/a n/a 0.0 0.0
+Total 0.0 n/a n/a 0.0 0.0
------------------------------------------ ------ ------ ------ ------ ------
View
8 test_output/cover/module_import.5.008
@@ -1,12 +1,12 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/Module_import.pm 0.00 n/a n/a 0.00 0.00
-tests/module_import 100.00 n/a n/a n/a 100.00
-Total 50.00 n/a n/a 0.00 33.33
+tests/Module_import.pm 0.0 n/a n/a 0.0 0.0
+tests/module_import 100.0 n/a n/a n/a 100.0
+Total 50.0 n/a n/a 0.0 33.3
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/module_import.5.008001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/Module_import.pm 0.00 n/a n/a 0.00 0.00
-Total 0.00 n/a n/a 0.00 0.00
+tests/Module_import.pm 0.0 n/a n/a 0.0 0.0
+Total 0.0 n/a n/a 0.0 0.0
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/overloaded.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/overloaded 100.00 50.00 n/a 100.00 91.67
-Total 100.00 50.00 n/a 100.00 91.67
+tests/overloaded 100.0 50.0 n/a 100.0 91.7
+Total 100.0 50.0 n/a 100.0 91.7
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/pod.5.006001
@@ -1,12 +1,12 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
--------------------------------------------------------------- ------ ------
File pod total
--------------------------------------------------------------- ------ ------
-tests/Module1.pm 50.00 50.00
+tests/Module1.pm 50.0 50.0
tests/pod n/a n/a
-Total 50.00 50.00
+Total 50.0 50.0
--------------------------------------------------------------- ------ ------
View
6 test_output/cover/skip.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/skip 83.33 50.00 n/a 100.00 72.73
-Total 83.33 50.00 n/a 100.00 72.73
+tests/skip 83.3 50.0 n/a 100.0 72.7
+Total 83.3 50.0 n/a 100.0 72.7
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/special_blocks.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/special_blocks 100.00 n/a n/a n/a 100.00
-Total 100.00 n/a n/a n/a 100.00
+tests/special_blocks 100.0 n/a n/a n/a 100.0
+Total 100.0 n/a n/a n/a 100.0
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/statement.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/statement 100.00 n/a n/a n/a 100.00
-Total 100.00 n/a n/a n/a 100.00
+tests/statement 100.0 n/a n/a n/a 100.0
+Total 100.0 n/a n/a n/a 100.0
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/t0.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/t0 92.31 62.50 66.67 n/a 79.17
-Total 92.31 62.50 66.67 n/a 79.17
+tests/t0 92.3 62.5 66.7 n/a 79.2
+Total 92.3 62.5 66.7 n/a 79.2
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/t0.5.008001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/t0 90.91 62.50 66.67 n/a 77.27
-Total 90.91 62.50 66.67 n/a 77.27
+tests/t0 90.9 62.5 66.7 n/a 77.3
+Total 90.9 62.5 66.7 n/a 77.3
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/t1.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/t1 100.00 n/a n/a 100.00 100.00
-Total 100.00 n/a n/a 100.00 100.00
+tests/t1 100.0 n/a n/a 100.0 100.0
+Total 100.0 n/a n/a 100.0 100.0
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/t2.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/t2 91.67 50.00 n/a 100.00 78.95
-Total 91.67 50.00 n/a 100.00 78.95
+tests/t2 91.7 50.0 n/a 100.0 78.9
+Total 91.7 50.0 n/a 100.0 78.9
------------------------------------------ ------ ------ ------ ------ ------
View
6 test_output/cover/t2.5.008001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/t2 90.00 50.00 n/a 100.00 76.47
-Total 90.00 50.00 n/a 100.00 76.47
+tests/t2 90.0 50.0 n/a 100.0 76.5
+Total 90.0 50.0 n/a 100.0 76.5
------------------------------------------ ------ ------ ------ ------ ------
View
8 test_output/cover/trivial.5.006001
@@ -1,11 +1,11 @@
-Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
+Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3702/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
-tests/trivial 100.00 n/a n/a n/a 100.00
-Total 100.00 n/a n/a n/a 100.00
+tests/trivial 100.0 n/a n/a n/a 100.0
+Total 100.0 n/a n/a n/a 100.0
------------------------------------------ ------ ------ ------ ------ ------
@@ -14,7 +14,7 @@ tests/trivial
line err stmt branch cond sub code
1 #!/usr/bin/perl
2
-3 # Copyright 2002-2004, Paul Johnson (pjcj@cpan.org)
+3 # Copyright 2004, Paul Johnson (pjcj@cpan.org)
4
5 # This software is free. It is licensed under the same terms as Perl itself.
6
View
20 tests/default_param
@@ -0,0 +1,20 @@
+#!/usr/bin/perl
+
+# Copyright 2004, Paul Johnson (pjcj@cpan.org)
+
+# 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 strict;
+use warnings;
+
+sub p
+{
+ my $x = shift || 11;
+ my $y = shift || [];
+ my $z = shift || {};
+}
+
+p $_, $_, $_ for 0, 1;