@@ -18,3 +18,4 @@ pm_to_blib
*.orig
*.rej
tmp/
+MYMETA.yml
@@ -43,6 +43,7 @@ MANIFEST This list of files
MANIFEST.SKIP
META.yml
README
+t/internal/criteria.t
t/regexp/regexp_eval.t
tests/.uncoverable
tests/alias
@@ -110,96 +111,125 @@ utils/session.vim
test_output/cover/alias.5.006001
test_output/cover/alias1.5.006001
test_output/cover/alias1.5.008
+test_output/cover/alias1.5.013005
test_output/cover/branch_return_sub.5.006001
test_output/cover/branch_return_sub.5.008
+test_output/cover/branch_return_sub.5.013005
test_output/cover/change.5.006001
test_output/cover/cond_and.5.006001
test_output/cover/cond_and.5.008
test_output/cover/cond_and.5.008001
+test_output/cover/cond_and.5.013005
test_output/cover/cond_branch.5.006001
test_output/cover/cond_branch.5.008
test_output/cover/cond_branch.5.008001
test_output/cover/cond_branch.5.012000
test_output/cover/cond_branch.5.013001
+test_output/cover/cond_branch.5.013005
test_output/cover/cond_or.5.006001
test_output/cover/cond_or.5.006002
test_output/cover/cond_or.5.008
test_output/cover/cond_or.5.008001
test_output/cover/cond_or.5.010000
+test_output/cover/cond_or.5.013005
test_output/cover/cond_xor.5.006001
test_output/cover/cond_xor.5.008
test_output/cover/cond_xor.5.008001
+test_output/cover/cond_xor.5.013005
test_output/cover/default_param.5.006001
test_output/cover/default_param.5.008
test_output/cover/default_param.5.008001
test_output/cover/default_param.5.013001
+test_output/cover/default_param.5.013005
test_output/cover/deparse.5.006001
test_output/cover/deparse.5.008
+test_output/cover/deparse.5.013005
test_output/cover/destroy.5.006001
test_output/cover/dynamic_subs.5.006001
test_output/cover/dynamic_subs.5.008
test_output/cover/dynamic_subs.5.008001
test_output/cover/dynamic_subs.5.008002
+test_output/cover/dynamic_subs.5.013005
test_output/cover/eval1.5.006001
test_output/cover/eval1.5.008
+test_output/cover/eval1.5.013005
test_output/cover/eval2.5.006001
test_output/cover/eval2.5.008
+test_output/cover/eval2.5.013005
test_output/cover/eval3.5.006001
test_output/cover/eval3.5.008
+test_output/cover/eval3.5.013005
test_output/cover/eval_sub.t.5.006001
test_output/cover/eval_sub.t.5.008
+test_output/cover/eval_sub.t.5.013005
test_output/cover/eval_use.t.5.006001
test_output/cover/eval_use.t.5.008
+test_output/cover/eval_use.t.5.013005
test_output/cover/exec.5.006001
test_output/cover/fork.5.006001
test_output/cover/if.5.006001
test_output/cover/if.5.008
+test_output/cover/if.5.013005
test_output/cover/inc_sub.5.006001
test_output/cover/inc_sub.5.008
test_output/cover/inc_sub.5.010000
+test_output/cover/inc_sub.5.013005
test_output/cover/md5.5.006001
test_output/cover/module1.5.006001
test_output/cover/module1.5.008
test_output/cover/module1.5.008001
+test_output/cover/module1.5.013005
test_output/cover/module2.5.006001
test_output/cover/module2.5.008
test_output/cover/module2.5.008001
+test_output/cover/module2.5.013005
test_output/cover/module_ignore.5.006001
test_output/cover/module_ignore.5.008
test_output/cover/module_ignore.5.008001
+test_output/cover/module_ignore.5.013005
test_output/cover/module_import.5.006001
test_output/cover/module_import.5.008
test_output/cover/module_import.5.008001
+test_output/cover/module_import.5.013005
test_output/cover/module_relative.5.006001
test_output/cover/module_relative.5.008
test_output/cover/module_relative.5.008001
+test_output/cover/module_relative.5.013005
test_output/cover/overload_bool.5.006001
test_output/cover/overload_bool.5.008
+test_output/cover/overload_bool.5.013005
test_output/cover/overloaded.5.006001
test_output/cover/overloaded.5.008
+test_output/cover/overloaded.5.013005
test_output/cover/pod.5.006001
test_output/cover/pod.5.008
test_output/cover/pod_nocp.5.006001
test_output/cover/pod_nocp.5.008
test_output/cover/require.5.006001
test_output/cover/require.5.008
+test_output/cover/require.5.013005
test_output/cover/skip.5.006001
test_output/cover/sort.5.006001
test_output/cover/sort.5.008
+test_output/cover/sort.5.013005
test_output/cover/special_blocks.5.006001
test_output/cover/special_blocks.5.008
test_output/cover/special_blocks.5.008001
test_output/cover/special_blocks.5.010000
+test_output/cover/special_blocks.5.013005
test_output/cover/statement.5.006001
test_output/cover/subs_only.5.006001
test_output/cover/t0.5.006001
test_output/cover/t0.5.008
test_output/cover/t0.5.008001
+test_output/cover/t0.5.013005
test_output/cover/t1.5.006001
test_output/cover/t1.5.008
+test_output/cover/t1.5.013005
test_output/cover/t2.5.006001
test_output/cover/t2.5.008
test_output/cover/t2.5.008001
+test_output/cover/t2.5.013005
test_output/cover/trivial.5.006001
test_output/cover/uncoverable.5.006001
test_output/cover/uncoverable.5.012000
@@ -24,3 +24,4 @@ lib/Devel/Cover/Inc.pm$
^bugs/
.git/
.tar.bz2$
+^MYMETA.yml$
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Devel-Cover
-version: 0.71
+version: 0.72
abstract: Code coverage metrics for Perl
author:
- Paul Johnson (pjcj@cpan.org)
@@ -14,11 +14,12 @@ requires:
Digest::MD5: 0
Storable: 0
Test::More: 0
+ Test::Warn: 0
no_index:
directory:
- t
- inc
-generated_by: ExtUtils::MakeMaker version 6.55_02
+generated_by: ExtUtils::MakeMaker version 6.56
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
@@ -19,8 +19,8 @@ use File::Copy;
$| = 1;
-my $Version = "0.71";
-my $Date = "10th September 2010";
+my $Version = "0.72";
+my $Date = "27th September 2010";
my $Author = 'pjcj@cpan.org';
my @perlbug = ("perlbug", "-a", $Author,
@@ -94,6 +94,7 @@ for my $d (qw( t t/e2e ))
}
}
+my @tests;
opendir D, "tests" or die "Cannot opendir tests: $!";
for my $t (readdir D)
{
@@ -101,6 +102,8 @@ for my $t (readdir D)
next if $t =~ /\.(pm|pl|org|bak|uncoverable)$/;
next if $t =~ /~$/;
+ push @tests, $t;
+
if ($t =~ /\.t/)
{
copy("tests/$t", "t/e2e/$t") or die "Cannot copy tests/$t to t/e2e/$t: $!";
@@ -134,6 +137,9 @@ EOT
}
closedir D or die "Cannot closedir tests: $!";
+s/^/tests\// for @tests;
+push @tests, grep !/e2e/, <t/*/*.t>;
+
print "done\n\n";
my $e;
@@ -380,6 +386,7 @@ WriteMakefile
Storable => 0,
"Digest::MD5" => 0,
"Test::More" => 0,
+ "Test::Warn" => 0,
},
dist => { COMPRESS => "gzip --best --force" },
test => { TESTS => "t/*/*.t" },
@@ -428,6 +435,11 @@ sub MY::libscan
sub MY::postamble
{
+ my %tests;
+ @tests{@tests} = map { (my $t = $_) =~ s/\W/_/g; "cover_db_$t" } @tests;
+ my @reports =
+ qw(compilation html_basic html_minimal html html_subtle sort text2 text);
+
qq[
SET_VERSION = \$(PERL) -pi \\
-e 's/(^\\s*(?:our\\s+)\\\$\$VERSION = ")\\d+\\.\\d+(";)/\$\${1}$Version\$\$2/;' \\
@@ -511,12 +523,14 @@ all_gold :
\t rm -rf test_output
\t exec \$(PERL) utils/all_versions make gold
-self_cover : pure_all
+_delete_db : pure_all
\t rm -rf cover_db
-\t -DEVEL_COVER_SELF=1 \$(PERL) -Mblib -MDevel::Cover cover -delete t/e2e/cover_db_*
-\t -DEVEL_COVER_SELF=1 make test
-\t DEVEL_COVER_SELF=1 \$(PERL) -Mblib -MDevel::Cover cover t/e2e/cover_db_*
-\t DEVEL_COVER_SELF=1 \$(PERL) -Mblib -MDevel::Cover cover -report html_basic
+
+_self_cover_tests : @{[sort values %tests]}
+\t DEVEL_COVER_SELF=1 \$(PERL) -Mblib -MDevel::Cover cover -silent -write cover_db @{[sort values %tests]} > /dev/null 2>&1
+
+self_cover : _self_cover_reports
+\t \$(PERL) -Mblib cover -report html_basic
mani :
\t -rm MANIFEST
@@ -528,5 +542,19 @@ ok :
nok :
\t \@$Perlbug -nokay || echo "Please send your report manually to $Author"
- ]
+ ] . "\n" .
+ join "\n",
+
+ map("$tests{$_} : _delete_db\n" .
+ "\t \@echo Running $tests{$_}\n" .
+ "\t \@rm -rf $tests{$_}\n" .
+ "\t \@DEVEL_COVER_SELF=1 \$(PERL) -Mblib -MDevel::Cover=-db,$tests{$_},-silent,1,-coverage,all,-ignore,tests/,-coverage,pod-also_private-xx $_\n",
+ sort keys %tests),
+
+ "_self_cover_reports : @{[map qq(report_$_), @reports]}\n",
+
+ map("report_$_ : _self_cover_tests\n" .
+ "\t \@echo Generating $_ report\n" .
+ "\t \@DEVEL_COVER_SELF=1 \$(PERL) -Mblib -MDevel::Cover cover -silent -report $_\n",
+ @reports)
}
@@ -74,6 +74,9 @@ DESCRIPTION
be perl-qa. Discussion has migrated there from perl-qa-metrics which is
now defunct. See <http://lists.perl.org/showlist.cgi?name=perl-qa>.
+ The Devel::Cover repository can be found at
+ <http://github.com/pjcj/Devel--Cover>.
+
REQUIREMENTS
* Perl 5.6.1 or greater. Perl 5.8.2 or greater is recommended.
@@ -104,6 +107,10 @@ REQUIREMENTS
in order to run the tests
+ * Test::Warn
+
+ in order to run some of the tests
+
* Test::Differences
if the tests fail and you would like nice output telling you why.
@@ -12,12 +12,12 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
-use Devel::Cover::DB 0.71;
+use Devel::Cover::DB 0.72;
use Config;
-use Cwd "abs_path";
+use File::Spec;
use Data::Dumper;
use File::Find ();
use File::Path;
@@ -180,12 +180,12 @@ sub main
pod2usage(-exitval => 0, -verbose => 1) if $Options->{help};
pod2usage(-exitval => 0, -verbose => 2) if $Options->{info};
- my $dbname = Cwd::abs_path(@ARGV ? shift @ARGV : "cover_db");
+ my $dbname = File::Spec->rel2abs(@ARGV ? shift @ARGV : "cover_db");
die "Can't open database $dbname\n"
if !$Options->{delete} && !$Options->{test} && !-d $dbname;
$Options->{outputdir} = $dbname unless exists $Options->{outputdir};
- my $od = Cwd::abs_path($Options->{outputdir});
+ my $od = File::Spec->rel2abs($Options->{outputdir});
$Options->{outputdir} = $od if defined $od;
mkpath($Options->{outputdir}) unless -d $Options->{outputdir};
@@ -446,7 +446,7 @@ See the BUGS file.
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -12,14 +12,15 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
-use Devel::Cover::DB 0.71;
+use Devel::Cover::DB 0.72;
use Cwd ();
use Getopt::Long;
use Pod::Usage;
use Template 2.00;
+use Parallel::Iterator "iterate_as_array";
# use Carp; $SIG{__DIE__} = \&Carp::confess;
@@ -108,11 +109,14 @@ sub get_cover
my $db = "$d/cover_db";
print "Already analysed\n" if -d $db;
+ my $out = "cover.out";
+ unlink $out;
+
my $test = !-e "$db/runs" || $Options->{force} ? " -test" : "";
if ($test)
{
print "Testing $module\n";
- sys "$^X Makefile.PL" unless -e "Makefile";
+ sys "$^X Makefile.PL >> $out 2>&1" unless -e "Makefile";
}
my $od = "$Options->{outputdir}/$module";
@@ -126,7 +130,8 @@ sub get_cover
local $SIG{ALRM} = sub { die "alarm\n" };
alarm $timeout;
sys "cover$test -report $Options->{report} " .
- "-outputdir $od -outputfile $of";
+ "-outputdir $od -outputfile $of " .
+ ">> $out 2>&1";
alarm 0;
};
if ($@)
@@ -147,6 +152,8 @@ sub get_cover
print S "$mod $results->{$mod}\n";
}
close S or die "Can't close $f: $!\n";
+
+ sys "cat $out" if -e $out;
}
sub write_stylesheet
@@ -330,7 +337,15 @@ sub main
if ($Options->{collect})
{
- get_cover($_) for @{$Options->{module}};
+ my $workers = $ENV{CPANCOVER_WORKERS} || 0;
+ my @res = iterate_as_array
+ (
+ { workers => $workers },
+ sub { get_cover $_[1] },
+ $Options->{module}
+ );
+ use Data::Dumper; print Dumper \@res;
+ # get_cover($_) for @{$Options->{module}};
}
write_html;
@@ -341,7 +356,7 @@ package Devel::Cover::Cpancover::Template::Provider;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use base "Template::Provider";
@@ -378,7 +393,7 @@ $Templates{html} = <<'EOT';
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
-This file was generated by Devel::Cover Version 0.71
+This file was generated by Devel::Cover Version 0.72
Devel::Cover is copyright 2001-2010, 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:
@@ -479,7 +494,7 @@ The following exit values are returned:
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -1,5 +1,14 @@
Devel::Cover.pm history
+Release 0.72 - 27th September 2010
+ - Teach cpancover how to work in parallel.
+ - Improve speed of check_file() (Goro Fuji).
+ - Fix errors with non-existent directories on Cygwin (Goro Fuji).
+ - Improve self coverage with new test.
+ - Fix tests to work with 5.13.5.
+ - New dependency on Test::Warn.
+ - New dependency on Parallel::Iterator for cpancover.
+
Release 0.71 - 10th September 2010
- Improve running of Devel::Cover on itself.
- Fix occasional parallel test failures.
@@ -12,9 +12,9 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
-use Devel::Cover::DB 0.71;
+use Devel::Cover::DB 0.72;
use File::Path;
use File::Spec;
@@ -185,7 +185,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,7 +10,7 @@ package Devel::Cover::Annotation::Random;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use Getopt::Long;
@@ -103,7 +103,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,7 +10,7 @@ package Devel::Cover::Annotation::Svk;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use Getopt::Long;
use Digest::MD5;
@@ -175,7 +175,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,7 +10,7 @@ package Devel::Cover::Branch;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use base "Devel::Cover::Criterion";
@@ -88,7 +88,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,7 +10,7 @@ package Devel::Cover::Condition;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use base "Devel::Cover::Branch";
@@ -50,7 +50,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,7 +10,7 @@ package Devel::Cover::Condition_and_2;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use base "Devel::Cover::Condition";
@@ -46,7 +46,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,7 +10,7 @@ package Devel::Cover::Condition_and_3;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use base "Devel::Cover::Condition";
@@ -46,7 +46,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,7 +10,7 @@ package Devel::Cover::Condition_or_2;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use base "Devel::Cover::Condition";
@@ -46,7 +46,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,7 +10,7 @@ package Devel::Cover::Condition_or_3;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use base "Devel::Cover::Condition";
@@ -46,7 +46,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,7 +10,7 @@ package Devel::Cover::Condition_xor_4;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use base "Devel::Cover::Condition";
@@ -45,7 +45,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,19 +10,19 @@ package Devel::Cover::Criterion;
use strict;
use warnings;
-our $VERSION = "0.71";
-
-use Devel::Cover::Statement 0.71;
-use Devel::Cover::Branch 0.71;
-use Devel::Cover::Condition 0.71;
-use Devel::Cover::Condition_or_2 0.71;
-use Devel::Cover::Condition_or_3 0.71;
-use Devel::Cover::Condition_and_2 0.71;
-use Devel::Cover::Condition_and_3 0.71;
-use Devel::Cover::Condition_xor_4 0.71;
-use Devel::Cover::Subroutine 0.71;
-use Devel::Cover::Time 0.71;
-use Devel::Cover::Pod 0.71;
+our $VERSION = "0.72";
+
+use Devel::Cover::Statement 0.72;
+use Devel::Cover::Branch 0.72;
+use Devel::Cover::Condition 0.72;
+use Devel::Cover::Condition_or_2 0.72;
+use Devel::Cover::Condition_or_3 0.72;
+use Devel::Cover::Condition_and_2 0.72;
+use Devel::Cover::Condition_and_3 0.72;
+use Devel::Cover::Condition_xor_4 0.72;
+use Devel::Cover::Subroutine 0.72;
+use Devel::Cover::Time 0.72;
+use Devel::Cover::Pod 0.72;
sub coverage { $_[0][0] }
sub information { $_[0][1] }
@@ -97,7 +97,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,9 +10,9 @@ package Devel::Cover::DB::File;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
-use Devel::Cover::Criterion 0.71;
+use Devel::Cover::Criterion 0.72;
sub calculate_summary
{
@@ -79,7 +79,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -16,7 +16,7 @@ use Storable;
use Devel::Cover::DB;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
our $AUTOLOAD;
sub new
@@ -207,7 +207,7 @@ sub digest
{
warn "Devel::Cover: Can't open $file for MD5 digest: $!\n"
unless lc $file eq "-e";
- # use Carp; print STDERR Carp::longmess("in " . `pwd`);
+ # print STDERR Carp::longmess("in " . `pwd`);
}
$digest
}
@@ -216,6 +216,7 @@ sub get_count
{
my $self = shift;
my ($criterion) = @_;
+ return 0 unless $self->{file}; # TODO - how does this get unset?
$self->{count}{$criterion}{$self->{file}}
}
@@ -251,7 +252,7 @@ sub write
$self->{f}{$file}{file} = $file;
unless ($self->{f}{$file}{digest})
{
- warn "Can't find digest for $file";
+ warn "Can't find digest for $file" unless $Devel::Cover::Silent;
next;
}
my $df = "$dir/$self->{f}{$file}{digest}";
@@ -323,7 +324,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,11 +10,11 @@ package Devel::Cover::DB;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
-use Devel::Cover::Criterion 0.71;
-use Devel::Cover::DB::File 0.71;
-use Devel::Cover::DB::Structure 0.71;
+use Devel::Cover::Criterion 0.72;
+use Devel::Cover::DB::File 0.72;
+use Devel::Cover::DB::Structure 0.72;
use Carp;
use File::Path;
@@ -711,6 +711,8 @@ sub cover
for my $run (@runs)
{
+ last unless $st;
+
my $r = $self->{runs}{$run};
@{$self->{collected}}{@{$r->{collected}}} = ();
$st->add_criteria(@{$r->{collected}});
@@ -1007,7 +1009,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -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.71";
+our $VERSION = "0.72";
use Devel::Cover qw( -ignore blib -ignore \\wB\\w );
use B::Concise qw( set_style add_callback );
@@ -112,7 +112,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,7 +10,7 @@ package Devel::Cover::Pod;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use base "Devel::Cover::Criterion";
@@ -66,7 +66,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -18,9 +18,9 @@ package Devel::Cover::Report::Compilation;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
-use Devel::Cover::DB 0.71;
+use Devel::Cover::DB 0.72;
# TODO - uncoverable code?
@@ -169,7 +169,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,7 +10,7 @@ package Devel::Cover::Report::Html;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use base "Devel::Cover::Report::Html_minimal";
@@ -46,7 +46,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,10 +10,10 @@ package Devel::Cover::Report::Html_basic;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
-use Devel::Cover::DB 0.71;
-use Devel::Cover::Web 0.71 "write_file";
+use Devel::Cover::DB 0.72;
+use Devel::Cover::Web 0.72 "write_file";
use Getopt::Long;
use Template 2.00;
@@ -449,7 +449,7 @@ package Devel::Cover::Report::Html_basic::Template::Provider;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use base "Template::Provider";
@@ -469,7 +469,7 @@ $Templates{html} = <<'EOT';
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
-This file was generated by Devel::Cover Version 0.71
+This file was generated by Devel::Cover Version 0.72
Devel::Cover is copyright 2001-2010, 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:
@@ -770,7 +770,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -4,10 +4,10 @@ use strict;
use warnings;
use CGI;
use Getopt::Long;
-use Devel::Cover::DB 0.71;
-use Devel::Cover::Truth_Table 0.71;
+use Devel::Cover::DB 0.72;
+use Devel::Cover::Truth_Table 0.72;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
#-------------------------------------------------------------------------------
# Subroutine : get_coverage_for_line
@@ -261,7 +261,7 @@ sub print_html_header {
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
-This file was generated by Devel::Cover Version 0.71
+This file was generated by Devel::Cover Version 0.72
Devel::Cover is copyright 2001-2010, 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:
@@ -776,7 +776,7 @@ Devel::Cover
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -2,10 +2,10 @@ package Devel::Cover::Report::Html_subtle;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
-use Devel::Cover::DB 0.71;
-use Devel::Cover::Truth_Table 0.71;
+use Devel::Cover::DB 0.72;
+use Devel::Cover::Truth_Table 0.72;
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.71";
+our $VERSION = "0.72";
use base "Template::Provider";
@@ -404,7 +404,7 @@ sub fetch {
$Templates{html} = <<'EOT';
<?xml version="1.0" encoding="utf-8"?>
<!--
-This file was generated by Devel::Cover Version 0.71
+This file was generated by Devel::Cover Version 0.72
Devel::Cover is copyright 2001-2010, 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:
@@ -728,7 +728,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,9 +10,9 @@ package Devel::Cover::Report::Sort;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
-use Devel::Cover::DB 0.71;
+use Devel::Cover::DB 0.72;
sub print_sort
{
@@ -95,7 +95,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,9 +10,9 @@ package Devel::Cover::Report::Text;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
-use Devel::Cover::DB 0.71;
+use Devel::Cover::DB 0.72;
sub print_runs
{
@@ -313,7 +313,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -2,9 +2,9 @@ package Devel::Cover::Report::Text2;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
-use Devel::Cover::DB 0.71;
+use Devel::Cover::DB 0.72;
use Devel::Cover::Truth_Table;
my %format = (
@@ -191,7 +191,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,7 +10,7 @@ package Devel::Cover::Statement;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use base "Devel::Cover::Criterion";
@@ -51,7 +51,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,7 +10,7 @@ package Devel::Cover::Subroutine;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use base "Devel::Cover::Criterion";
@@ -50,7 +50,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,14 +10,14 @@ package Devel::Cover::Test;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use Carp;
use File::Spec;
use Test;
-use Devel::Cover::Inc 0.71;
+use Devel::Cover::Inc 0.72;
my $Test;
@@ -10,7 +10,7 @@ package Devel::Cover::Time;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use base "Devel::Cover::Criterion";
@@ -71,7 +71,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -180,7 +180,7 @@ sub error {
package Devel::Cover::Truth_Table;
use warnings;
use strict;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
#-------------------------------------------------------------------------------
# Subroutine : new()
@@ -567,7 +567,7 @@ None that I'm aware of...
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENSE
@@ -163,7 +163,7 @@ basis for future research.
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -12,7 +12,7 @@ package Devel::Cover::Web;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use Exporter;
@@ -934,7 +934,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -10,13 +10,13 @@ package Devel::Cover;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use DynaLoader ();
our @ISA = "DynaLoader";
-use Devel::Cover::DB 0.71;
-use Devel::Cover::Inc 0.71;
+use Devel::Cover::DB 0.72;
+use Devel::Cover::Inc 0.72;
use B qw( class ppname main_cv main_start main_root walksymtable OPf_KIDS );
use B::Debug;
@@ -513,10 +513,10 @@ sub check_file
{
my ($cv) = @_;
- return unless class($cv) eq "CV";
+ return unless ref($cv) eq "B::CV";
my $op = $cv->START;
- return unless $op->can("file") && class($op) ne "NULL" && is_state($op);
+ return unless ref($op) eq "B::COP";
my $file = $op->file;
my $use = use_file($file);
@@ -1093,6 +1093,7 @@ sub get_cover
# print STDERR "get_cover: <$Sub_name>\n";
return unless defined $Sub_name; # Only happens within Safe.pm, AFAIK.
+ # return unless length $Sub_name; # Only happens with Self_cover, AFAIK.
get_location($start) if $start;
# print STDERR "[[$File:$Line]]\n";
@@ -1285,6 +1286,9 @@ The most appropriate mailing list on which to discuss this module would
be perl-qa. Discussion has migrated there from perl-qa-metrics which is
now defunct. See L<http://lists.perl.org/showlist.cgi?name=perl-qa>.
+The Devel::Cover repository can be found at
+L<http://github.com/pjcj/Devel--Cover>.
+
=head1 REQUIREMENTS
=over
@@ -1318,6 +1322,10 @@ if you want Pod coverage.
in order to run the tests
+=item * L<Test::Warn>
+
+in order to run some of the tests
+
=item * L<Test::Differences>
if the tests fail and you would like nice output telling you why.
@@ -1481,7 +1489,7 @@ See the BUGS file. And the TODO file.
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -0,0 +1,36 @@
+use strict;
+use warnings;
+
+use Test::More;
+use Test::Warn;
+
+use Devel::Cover "-silent", 1;
+
+if ($] < 5.008000)
+{
+ plan skip_all => "Test requires perl 5.8.0 or greater";
+}
+else
+{
+ plan tests => 5;
+}
+
+Devel::Cover::set_coverage("none");
+is Devel::Cover::get_coverage(), "", "Set coverage to none empties coverage";
+
+Devel::Cover::set_coverage("all");
+is Devel::Cover::get_coverage(),
+ "branch condition path pod statement subroutine time",
+ "Set coverage to all fills coverage";
+
+Devel::Cover::remove_coverage("path");
+is Devel::Cover::get_coverage(),
+ "branch condition pod statement subroutine time",
+ "Removing path coverage works";
+
+warning_like { Devel::Cover::add_coverage("does_not_exist") }
+ qr/Devel::Cover: Unknown coverage criterion "does_not_exist" ignored./,
+ "Adding non-existent coverage warns";
+is Devel::Cover::get_coverage(),
+ "branch condition pod statement subroutine time",
+ "Adding non-existent coverage has no effect";
@@ -0,0 +1,109 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/Alias1.pm 100.0 100.0 n/a 100.0 100.0
+tests/alias1 100.0 n/a n/a 100.0 100.0
+Total 100.0 100.0 n/a 100.0 100.0
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/Alias1.pm
+
+line err stmt bran cond sub code
+1 # Copyright 2004-2010, Paul Johnson (pjcj@cpan.org)
+2
+3 # This software is free. It is licensed under the same terms as Perl itself.
+4
+5 # The latest version of this software should be available from my homepage:
+6 # http://www.pjcj.net
+7
+8 package Alias1;
+9
+10 1 1 use strict;
+ 1
+11 1 1 use warnings;
+ 1
+12
+13 1 1 use Exporter;
+ 1
+14
+15 our @ISA = qw(Exporter);
+16 our @EXPORT = qw(is_3digits);
+17
+18 sub is_3digits {
+19 2 2 my $val = shift;
+20 2 my $retval = undef;
+21 2 100 $retval=1 if $val =~ /^\d{3}$/;
+22 2 return $retval;
+23 }
+24
+25 1;
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+21 100 1 1 if $val =~ /^\d{3}$/
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- ------------------
+BEGIN 1 tests/Alias1.pm:10
+BEGIN 1 tests/Alias1.pm:11
+BEGIN 1 tests/Alias1.pm:13
+is_3digits 2 tests/Alias1.pm:19
+
+
+tests/alias1
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2004-2010, 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 1 1 use strict;
+ 1
+11 1 1 use warnings;
+ 1
+12 1 1 use lib "tests";
+ 1
+13
+14 1 1 use Alias1;
+ 1
+15
+16 1 is_3digits(1234);
+17 1 is_3digits(123);
+18
+19 1 exit;
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- ---------------
+BEGIN 1 tests/alias1:10
+BEGIN 1 tests/alias1:11
+BEGIN 1 tests/alias1:12
+BEGIN 1 tests/alias1:14
+
+
@@ -0,0 +1,78 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+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
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/branch_return_sub
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2004-2010, 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 1 1 use strict;
+ 1
+11 1 1 use warnings;
+ 1
+12
+13 sub my_sqrt
+14 {
+15 3 3 my $n = shift;
+16
+17 3 100 100 if ( !defined($n) || ($n < 0) ) {
+18 2 return undef;
+19 }
+20
+21 1 return sqrt($n);
+22 }
+23
+24 1 my_sqrt(25);
+25 1 my_sqrt(-2);
+26 1 my_sqrt(undef);
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+17 100 2 1 if (not defined $n or $n < 0)
+
+
+Conditions
+----------
+
+or 3 conditions
+
+line err % l !l&&r !l&&!r expr
+----- --- ------ ------ ------ ------ ----
+17 100 1 1 1 not defined $n or $n < 0
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- --------------------------
+BEGIN 1 tests/branch_return_sub:10
+BEGIN 1 tests/branch_return_sub:11
+my_sqrt 3 tests/branch_return_sub:15
+
+
@@ -0,0 +1,124 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/cond_and 95.7 50.0 55.6 100.0 76.6
+Total 95.7 50.0 55.6 100.0 76.6
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/cond_and
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2002-2010, 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 1 1 use strict;
+ 1
+11 1 1 use warnings;
+ 1
+12
+13 1 my @x;
+14
+15 1 my $y = 1;
+16 1 my $z = 0;
+17
+18 1 for (0 .. 10)
+19 {
+20 *** 11 50 $y &&
+21 $x[1]++;
+22
+23 *** 11 100 66 $y &&
+24 $x[0]++ &&
+25 $x[1]++;
+26
+27 *** 11 50 $x[2]++
+28 if $z;
+29
+30 11 for (0 .. 2)
+31 {
+32 33 $x[3]++;
+33 }
+34
+35 *** 11 50 if ($y)
+36 {
+37 11 $x[4]++;
+38 }
+39 else
+40 {
+41 *** 0 0 $y && $x[5]++;
+42 }
+43
+44 11 my $p = $y & $z;
+45
+46 *** 11 50 $p &&= $y;
+47 *** 11 50 $p &&= $z;
+48 11 my $q = 1;
+49 *** 11 50 $q &&= $_;
+50
+51 11 pas();
+52 }
+53
+54 sub pas
+55 {
+56 *** 11 50 11 $y && $z
+57 }
+58
+59 # print join(", ", @x), "\n";
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+20 *** 50 11 0 if $y
+23 100 10 1 if $y and $x[0]++
+27 *** 50 0 11 if $z
+35 *** 50 11 0 if ($y) { }
+41 *** 0 0 0 if $y
+56 *** 50 11 0 if $y
+
+
+Conditions
+----------
+
+and 2 conditions
+
+line err % l !l expr
+----- --- ------ ------ ------ ----
+46 *** 50 11 0 $p &&= $y
+47 *** 50 11 0 $p &&= $z
+49 *** 50 0 11 $q &&= $_
+
+and 3 conditions
+
+line err % !l l&&!r l&&r expr
+----- --- ------ ------ ------ ------ ----
+23 *** 66 0 1 10 $y and $x[0]++
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- -----------------
+BEGIN 1 tests/cond_and:10
+BEGIN 1 tests/cond_and:11
+pas 11 tests/cond_and:56
+
+
@@ -0,0 +1,553 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/cond_branch 89.7 79.3 32.9 100.0 75.5
+Total 89.7 79.3 32.9 100.0 75.5
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/cond_branch
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2002-2010, 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 1 1 use strict;
+ 1
+11 1 1 use warnings;
+ 1
+12
+13 1 my @x;
+14
+15 1 for my $y (0, 0)
+16 {
+17 2 for my $z (1, 0)
+18 {
+19 *** 4 50 33 if ($y && $z)
+20 {
+21 *** 0 $x[1]++;
+22 }
+23 else
+24 {
+25 4 $x[2]++;
+26 }
+27 *** 4 100 66 if ($y || $z)
+28 {
+29 2 $x[3]++;
+30 }
+31 else
+32 {
+33 2 $x[4]++;
+34 }
+35
+36 *** 4 50 $y && $x[5]++;
+37 *** 4 50 $x[5]++ if $y;
+38
+39 4 100 $z && $x[6]++;
+40 4 100 $x[6]++ if $z;
+41
+42 *** 4 50 $y || $x[7]++;
+43 *** 4 50 $x[7]++ unless $y;
+44
+45 4 100 $z || $x[8]++;
+46 4 100 $x[8]++ unless $z;
+47
+48 *** 4 50 $y ? $x[9]++ : $x[10]++;
+49 4 100 $z ? $x[11]++ : $x[12]++;
+50
+51 *** 4 50 33 if ($y)
+ *** 50 66
+ 100
+52 {
+53 *** 0 $x[13]++;
+54 }
+55 elsif ($y && $z)
+56 {
+57 *** 0 $x[14]++;
+58 }
+59 elsif ($y || $z)
+60 {
+61 2 $x[15]++;
+62 }
+63 else
+64 {
+65 2 $x[16]++;
+66 }
+67
+68 *** 4 50 33 $y && $z && $x[17]++; $y && $z && $x[18]++;
+ *** 4 50 33
+69 }
+70 }
+71
+72
+73 1 for my $y (0, 1)
+74 {
+75 2 100 $y || next;
+76 1 $x[18]++;
+77 }
+78
+79 1 for my $y (1, 0)
+80 {
+81 2 100 $y || next;
+82 1 $x[19]++;
+83 }
+84
+85 1 for my $y (0, 1)
+86 {
+87 2 100 $y && next;
+88 1 $x[20]++;
+89 }
+90
+91 1 for my $y (1, 0)
+92 {
+93 2 100 $y && next;
+94 1 $x[21]++;
+95 }
+96
+97 1 for my $y (0, 1)
+98 {
+99 1 1 no warnings "void";
+ 1
+100 *** 2 0 my $w = $y xor next;
+101 *** 0 $x[22]++;
+102 }
+103
+104 1 for my $y (1, 0)
+105 {
+106 1 1 no warnings "void";
+ 1
+107 *** 2 0 my $w = $y xor next;
+108 *** 0 $x[23]++;
+109 }
+110
+111
+112 1 for my $y (0, 1)
+113 {
+114 *** 1 50 $y || last;
+115 *** 0 $x[24]++;
+116 }
+117
+118 1 for my $y (1, 0)
+119 {
+120 2 100 $y || last;
+121 1 $x[25]++;
+122 }
+123
+124 1 for my $y (0, 1)
+125 {
+126 2 100 $y && last;
+127 1 $x[26]++;
+128 }
+129
+130 1 for my $y (1, 0)
+131 {
+132 *** 1 50 $y && last;
+133 *** 0 $x[27]++;
+134 }
+135
+136 1 for my $y (0, 1)
+137 {
+138 1 1 no warnings "void";
+ 1
+139 *** 1 0 my $w = $y xor last;
+140 *** 0 $x[28]++;
+141 }
+142
+143 1 for my $y (1, 0)
+144 {
+145 1 1 no warnings "void";
+ 1
+146 *** 1 0 my $w = $y xor last;
+147 *** 0 $x[29]++;
+148 }
+149
+150
+151 1 for my $y (0, 1)
+152 {
+153 *** 1 50 $y || goto G1;
+154 *** 0 $x[30]++;
+155 }
+156 G1:
+157
+158 1 for my $y (1, 0)
+159 {
+160 2 100 $y || goto G2;
+161 1 $x[31]++;
+162 }
+163 G2:
+164
+165 1 for my $y (0, 1)
+166 {
+167 2 100 $y && goto G3;
+168 1 $x[32]++;
+169 }
+170 G3:
+171
+172 1 for my $y (1, 0)
+173 {
+174 *** 1 50 $y && goto G4;
+175 *** 0 $x[33]++;
+176 }
+177 G4:
+178
+179 1 for my $y (0, 1)
+180 {
+181 1 1 no warnings "void";
+ 1
+182 *** 1 0 my $w = $y xor goto G5;
+183 *** 0 $x[34]++;
+184 }
+185 G5:
+186
+187 1 for my $y (1, 0)
+188 {
+189 1 1 no warnings "void";
+ 1
+190 *** 1 0 my $w = $y xor goto G6;
+191 *** 0 $x[35]++;
+192 }
+193 G6:
+194
+195
+196 1 my $z;
+197
+198 1 $z = -1;
+199 1 for my $y (0, 1)
+200 {
+201 3 $z++;
+202 3 100 last if $z > 1;
+203 2 100 $z || redo;
+204 1 $x[36]++;
+205 }
+206
+207 1 $z = -1;
+208 1 for my $y (1, 0)
+209 {
+210 3 $z++;
+211 3 100 last if $z > 1;
+212 2 100 !$z || redo;
+213 1 $x[37]++;
+214 }
+215
+216 1 $z = -1;
+217 1 for my $y (0, 1)
+218 {
+219 3 $z++;
+220 3 100 last if $z > 1;
+221 2 100 $z && redo;
+222 1 $x[38]++;
+223 }
+224
+225 1 $z = -1;
+226 1 for my $y (1, 0)
+227 {
+228 3 $z++;
+229 3 100 last if $z > 1;
+230 2 100 !$z && redo;
+231 1 $x[39]++;
+232 }
+233
+234
+235 1 $z = -1;
+236 1 for my $y (0, 1)
+237 {
+238 3 $z++;
+239 3 100 last if $z > 1;
+240 1 1 no warnings "void";
+ 1
+241 *** 2 0 my $w = $z xor redo;
+242 *** 0 $x[40]++;
+243 }
+244
+245 1 $z = -1;
+246 1 for my $y (1, 0)
+247 {
+248 3 $z++;
+249 3 100 last if $z > 1;
+250 1 1 no warnings "void";
+ 1
+251 *** 2 0 my $w = !$z xor redo;
+252 *** 0 $x[41]++;
+253 }
+254
+255
+256 my @s =
+257 (
+258 sub
+259 {
+260 4 100 4 shift || return;
+261 2 $x[42]++;
+262 },
+263
+264 sub
+265 {
+266 4 100 4 shift && return;
+267 2 $x[43]++;
+268 },
+269
+270 sub
+271 {
+272 1 1 no warnings "void";
+ 1
+273 *** 4 0 4 shift xor return;
+274 *** 0 $x[44]++;
+275 },
+276
+277 sub
+278 {
+279 4 100 4 my $x = shift || return;
+280 2 $x[45]++;
+281 },
+282
+283 sub
+284 {
+285 4 100 4 my $x = shift && return;
+286 2 $x[46]++;
+287 },
+288
+289 sub
+290 {
+291 4 4 my $x = shift;
+292 4 for my $y (1 .. 2)
+293 {
+294 6 100 my $z = $x || last;
+295 4 $x[47]++;
+296 }
+297 },
+298
+299 sub
+300 {
+301 4 4 my $x = shift;
+302 4 for my $y (1 .. 2)
+303 {
+304 8 100 my $z = $x || next;
+305 4 $x[48]++;
+306 }
+307 },
+308
+309 sub
+310 {
+311 4 4 my $x = shift;
+312 4 for my $y (1 .. 2)
+313 {
+314 10 100 my $z = $x++ || redo;
+315 8 $x[49]++;
+316 }
+317 },
+318
+319 sub
+320 {
+321 4 4 my $x = shift;
+322 4 for my $y (1 .. 2)
+323 {
+324 6 100 my $z = $x || goto GR;
+325 4 $x[50]++;
+326 }
+327 GR:
+328 4 },
+329
+330 sub
+331 {
+332 4 4 my $x = shift;
+333 4 for my $y (1 .. 2)
+334 {
+335 8 100 eval { my $z = $x || die };
+ 8
+336 8 $x[51]++;
+337 }
+338 },
+339 1 );
+340
+341 1 for my $s (@s)
+342 {
+343 10 for my $y (0, 1)
+344 {
+345 20 $s->($y)
+346 }
+347
+348 10 for my $y (1, 0)
+349 {
+350 20 $s->($y)
+351 }
+352 }
+353
+354
+355 1 my ($a, $b) = (0, 1);
+356
+357 *** 1 50 33 if ($a && $b)
+ *** 50 33
+ *** 50 50
+358 {
+359 *** 0 print "path 1\n";
+360 }
+361 elsif (!$a && !$b)
+362 {
+363 *** 0 print "path 2\n";
+364 }
+365 elsif ($b || 0)
+366 {
+367 1 print "path 3\n";
+368 *** 1 50 33 if (!$b || $a)
+ *** 50 33
+369 {
+370 *** 0 print "path 4\n";
+371 }
+372 elsif (!$a && $b)
+373 {
+374 1 print "path 5\n";
+375 }
+376 }
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+19 *** 50 0 4 if ($y and $z) { }
+27 100 2 2 if ($y or $z) { }
+36 *** 50 0 4 if $y
+37 *** 50 0 4 if $y
+39 100 2 2 if $z
+40 100 2 2 if $z
+42 *** 50 4 0 unless $y
+43 *** 50 4 0 unless $y
+45 100 2 2 unless $z
+46 100 2 2 unless $z
+48 *** 50 0 4 $y ? :
+49 100 2 2 $z ? :
+51 *** 50 0 4 if ($y) { }
+ *** 50 0 4 elsif ($y and $z) { }
+ 100 2 2 elsif ($y or $z) { }
+68 *** 50 0 4 if $y and $z
+ *** 50 0 4 if $y and $z
+75 100 1 1 unless $y
+81 100 1 1 unless $y
+87 100 1 1 if $y
+93 100 1 1 if $y
+114 *** 50 1 0 unless $y
+120 100 1 1 unless $y
+126 100 1 1 if $y
+132 *** 50 1 0 if $y
+153 *** 50 1 0 unless $y
+160 100 1 1 unless $y
+167 100 1 1 if $y
+174 *** 50 1 0 if $y
+202 100 1 2 if $z > 1
+203 100 1 1 unless $z
+211 100 1 2 if $z > 1
+212 100 1 1 if $z
+220 100 1 2 if $z > 1
+221 100 1 1 if $z
+229 100 1 2 if $z > 1
+230 100 1 1 unless $z
+239 100 1 2 if $z > 1
+249 100 1 2 if $z > 1
+260 100 2 2 unless shift()
+266 100 2 2 if shift()
+357 *** 50 0 1 if ($a and $b) { }
+ *** 50 0 1 elsif (not $a || $b) { }
+ *** 50 1 0 elsif ($b or 0) { }
+368 *** 50 0 1 if (not $b or $a) { }
+ *** 50 1 0 elsif (not $a and $b) { }
+
+
+Conditions
+----------
+
+and 2 conditions
+
+line err % l !l expr
+----- --- ------ ------ ------ ----
+285 100 2 2 shift() && return
+
+and 3 conditions
+
+line err % !l l&&!r l&&r expr
+----- --- ------ ------ ------ ------ ----
+19 *** 33 4 0 0 $y and $z
+51 *** 33 4 0 0 $y and $z
+68 *** 33 4 0 0 $y and $z
+ *** 33 4 0 0 $y and $z
+357 *** 33 1 0 0 $a and $b
+368 *** 33 0 0 1 not $a and $b
+
+or 2 conditions
+
+line err % l !l expr
+----- --- ------ ------ ------ ----
+279 100 2 2 shift() || return
+294 100 4 2 $x || last
+304 100 4 4 $x || next
+314 100 8 2 $x++ || redo
+324 100 4 2 $x || goto GR
+335 100 4 4 $x || die
+357 *** 50 1 0 $b or 0
+
+or 3 conditions
+
+line err % l !l&&r !l&&!r expr
+----- --- ------ ------ ------ ------ ----
+27 *** 66 0 2 2 $y or $z
+51 *** 66 0 2 2 $y or $z
+357 *** 33 0 1 0 $a || $b
+368 *** 33 0 0 1 not $b or $a
+
+xor 4 conditions
+
+line err % l&&r l&&!r !l&&r !l&&!r expr
+----- --- ------ ------ ------ ------ ------ ----
+100 *** 0 0 0 0 0 my $w = $y xor next
+107 *** 0 0 0 0 0 my $w = $y xor next
+139 *** 0 0 0 0 0 my $w = $y xor last
+146 *** 0 0 0 0 0 my $w = $y xor last
+182 *** 0 0 0 0 0 my $w = $y xor goto G5
+190 *** 0 0 0 0 0 my $w = $y xor goto G6
+241 *** 0 0 0 0 0 my $w = $z xor redo
+251 *** 0 0 0 0 0 my $w = !$z xor redo
+273 *** 0 0 0 0 0 shift() xor return
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- ---------------------
+BEGIN 1 tests/cond_branch:10
+BEGIN 1 tests/cond_branch:106
+BEGIN 1 tests/cond_branch:11
+BEGIN 1 tests/cond_branch:138
+BEGIN 1 tests/cond_branch:145
+BEGIN 1 tests/cond_branch:181
+BEGIN 1 tests/cond_branch:189
+BEGIN 1 tests/cond_branch:240
+BEGIN 1 tests/cond_branch:250
+BEGIN 1 tests/cond_branch:272
+BEGIN 1 tests/cond_branch:99
+__ANON__ 4 tests/cond_branch:260
+__ANON__ 4 tests/cond_branch:266
+__ANON__ 4 tests/cond_branch:273
+__ANON__ 4 tests/cond_branch:279
+__ANON__ 4 tests/cond_branch:285
+__ANON__ 4 tests/cond_branch:291
+__ANON__ 4 tests/cond_branch:301
+__ANON__ 4 tests/cond_branch:311
+__ANON__ 4 tests/cond_branch:321
+__ANON__ 4 tests/cond_branch:332
+
+
@@ -0,0 +1,278 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/cond_or 90.2 35.0 72.3 75.0 73.8
+tests/cond_or.pl 100.0 n/a 62.5 100.0 77.9
+Total 93.4 35.0 67.8 85.7 75.3
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/cond_or
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2002-2010, 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 # __COVER__ skip_test $] < 5.008 || $^O eq "cygwin"
+11 # __COVER__ skip_reason Busted on 5.6 and cygwin
+12
+13 1 1 use strict;
+ 1
+14 1 1 use warnings;
+ 1
+15
+16 1 my @x;
+17
+18 1 my $y = 1;
+19 1 my $z = 0;
+20 1 $::foo = 17;
+21
+22 *** 1 50 if ($] >= 5.009)
+23 {
+24 1 $ENV{PATH} = "/bin";
+25 1 system "pwd";
+26 1 1 use lib "tests";
+ 1
+27 1 my $file = "cond_or.pl";
+28 *** 1 50 unless (my $return = do $file)
+29 {
+30 *** 0 0 die "couldn't parse $file: $@" if $@;
+31 *** 0 0 die "couldn't do $file: $!" unless defined $return;
+32 *** 0 0 die "couldn't run $file" unless $return;
+33 }
+34 }
+35
+36 1 for (0 .. 10)
+37 {
+38 *** 11 50 $y ||
+39 $x[1]++;
+40
+41 *** 11 50 33 $y ||
+42 $x[0]++ ||
+43 $x[1]++;
+44
+45 *** 11 50 $x[2]++
+46 unless $z;
+47
+48 11 for (0 .. 2)
+49 {
+50 33 $x[3]++;
+51 }
+52
+53 *** 11 50 if ($z)
+54 {
+55 *** 0 $x[4]++;
+56 }
+57 else
+58 {
+59 11 $x[5]++;
+60 }
+61
+62 *** 11 33 my $p = $y || $z;
+63 *** 11 33 my $q = $z || $y;
+64 11 100 my $r = $_ || "qqq";
+65 11 100 my $s = $_ || [];
+66 11 my $t = $y | $z;
+67 *** 11 50 my $u = $y || 0;
+68 *** 11 50 my $v = $y || undef;
+69 *** 11 50 my $w = $z || 0;
+70
+71 *** 11 50 $p ||= $y;
+72 *** 11 50 $p ||= $z;
+73 11 100 $x[ 6] ||= $y;
+74 *** 11 50 $x[ 7] ||= $z;
+75 11 100 $x[ 8] ||= 1;
+76 11 100 $x[ 9] ||= {};
+77 11 100 $x[10] ||= \"foo";
+78 11 100 $x[11] ||= \$y;
+79 11 100 $x[12] ||= \*STDIO;
+80 *** 11 100 0 $x[13] ||= sub { 1 };
+ *** 0
+81 11 100 $x[14] ||= *::foo{SCALAR};
+82 *** 11 50 $x[15] ||= *STDIO{IO};
+83 11 100 $x[16] ||= bless {}, "XXX";
+84 11 100 $x[17] ||= <<"EOD";
+85 blah
+86 EOD
+87 *** 11 50 cond_dor(\@x) if exists &cond_dor;
+88 }
+89
+90 # print join(", ", @x), "\n";
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+22 *** 50 1 0 if ($] >= 5.009)
+28 *** 50 0 1 unless (my $return = do $file)
+30 *** 0 0 0 if $@
+31 *** 0 0 0 unless defined $return
+32 *** 0 0 0 unless $return
+38 *** 50 0 11 unless $y
+41 *** 50 0 11 unless $y or $x[0]++
+45 *** 50 11 0 unless $z
+53 *** 50 0 11 if ($z) { }
+87 *** 50 11 0 if exists &cond_dor
+
+
+Conditions
+----------
+
+or 2 conditions
+
+line err % l !l expr
+----- --- ------ ------ ------ ----
+64 100 10 1 $_ || 'qqq'
+65 100 10 1 $_ || []
+67 *** 50 11 0 $y || 0
+68 *** 50 11 0 $y || undef
+69 *** 50 0 11 $z || 0
+71 *** 50 11 0 $p ||= $y
+72 *** 50 11 0 $p ||= $z
+73 100 10 1 $x[6] ||= $y
+74 *** 50 0 11 $x[7] ||= $z
+75 100 10 1 $x[8] ||= 1
+76 100 10 1 $x[9] ||= {}
+77 100 10 1 $x[10] ||= \'foo'
+78 100 10 1 $x[11] ||= \$y
+79 100 10 1 $x[12] ||= \*STDIO
+80 100 10 1 $x[13] ||= sub {
+ 1;
+}
+
+81 100 10 1 $x[14] ||= *foo{'SCALAR'}
+82 *** 50 0 11 $x[15] ||= *STDIO{'IO'}
+83 100 10 1 $x[16] ||= bless({}, 'XXX')
+84 100 10 1 $x[17] ||= "blah\n"
+
+or 3 conditions
+
+line err % l !l&&r !l&&!r expr
+----- --- ------ ------ ------ ------ ----
+41 *** 33 11 0 0 $y or $x[0]++
+62 *** 33 11 0 0 $y || $z
+63 *** 33 0 11 0 $z || $y
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- ----------------
+BEGIN 1 tests/cond_or:13
+BEGIN 1 tests/cond_or:14
+BEGIN 1 tests/cond_or:26
+
+Uncovered Subroutines
+---------------------
+
+Subroutine Count Location
+---------- ----- ----------------
+__ANON__ 0 tests/cond_or:80
+
+
+tests/cond_or.pl
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2002-2010, 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 1 1 use strict;
+ 1
+11 1 1 use warnings;
+ 1
+12
+13 sub cond_dor
+14 {
+15 11 11 my ($x) = @_;
+16
+17 11 100 $x->[18] //= undef;
+18 11 100 $x->[18] //= 0;
+19 *** 11 50 $x->[18] //= 0;
+20 *** 11 50 $x->[18] //= 1;
+21 *** 11 50 $x->[18] //= 1;
+22
+23 11 100 $x->[19] //= 1;
+24 *** 11 50 $x->[19] //= 1;
+25 *** 11 50 $x->[19] //= 0;
+26 *** 11 50 $x->[19] //= undef;
+27 *** 11 50 $x->[19] //= 1;
+28
+29 *** 11 50 $x->[20] = $x->[21] // undef;
+30 *** 11 50 $x->[20] = $x->[21] // 0;
+31 *** 11 50 $x->[20] = $x->[21] // 0;
+32 *** 11 50 $x->[20] = $x->[21] // 1;
+33 *** 11 50 $x->[20] = $x->[21] // 1;
+34
+35 11 100 $x->[22] = $x->[22] // undef;
+36 11 100 $x->[22] = $x->[22] // 0;
+37 *** 11 50 $x->[22] = $x->[22] // 0;
+38 *** 11 50 $x->[22] = $x->[22] // 1;
+39 *** 11 50 $x->[22] = $x->[22] // 1;
+40 }
+41
+42 1;
+
+
+Conditions
+----------
+
+or 2 conditions
+
+line err % l !l expr
+----- --- ------ ------ ------ ----
+17 100 10 1 $$x[18] //= undef
+18 100 10 1 $$x[18] //= 0
+19 *** 50 11 0 $$x[18] //= 0
+20 *** 50 11 0 $$x[18] //= 1
+21 *** 50 11 0 $$x[18] //= 1
+23 100 10 1 $$x[19] //= 1
+24 *** 50 11 0 $$x[19] //= 1
+25 *** 50 11 0 $$x[19] //= 0
+26 *** 50 11 0 $$x[19] //= undef
+27 *** 50 11 0 $$x[19] //= 1
+29 *** 50 0 11 $$x[21] // undef
+30 *** 50 0 11 $$x[21] // 0
+31 *** 50 0 11 $$x[21] // 0
+32 *** 50 0 11 $$x[21] // 1
+33 *** 50 0 11 $$x[21] // 1
+35 100 10 1 $$x[22] // undef
+36 100 10 1 $$x[22] // 0
+37 *** 50 11 0 $$x[22] // 0
+38 *** 50 11 0 $$x[22] // 1
+39 *** 50 11 0 $$x[22] // 1
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- -------------------
+BEGIN 1 tests/cond_or.pl:10
+BEGIN 1 tests/cond_or.pl:11
+cond_dor 11 tests/cond_or.pl:15
+
+
@@ -0,0 +1,72 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/cond_xor 100.0 n/a 66.7 100.0 85.2
+Total 100.0 n/a 66.7 100.0 85.2
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/cond_xor
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2002-2010, 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 1 1 use strict;
+ 1
+11 1 1 use warnings;
+ 1
+12
+13 1 my $i = 1;
+14 1 my $j = 0;
+15
+16 1 for my $y (0, 1, 1, 1)
+17 {
+18 4 for my $z (0, 0, 1)
+19 {
+20 12 my $x = $y ^ $z;
+21 12 100 $x = ($y xor $z);
+22
+23 *** 12 50 my $p = ($i xor $y);
+24 *** 12 50 $p = ($j xor $y);
+25 12 $p ^= $y;
+26 }
+27 }
+
+
+Conditions
+----------
+
+xor 4 conditions
+
+line err % l&&r l&&!r !l&&r !l&&!r expr
+----- --- ------ ------ ------ ------ ------ ----
+21 100 3 6 1 2 $y xor $z
+23 *** 50 9 3 0 0 $i xor $y
+24 *** 50 0 0 9 3 $j xor $y
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- -----------------
+BEGIN 1 tests/cond_xor:10
+BEGIN 1 tests/cond_xor:11
+
+
@@ -0,0 +1,66 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran 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
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/default_param
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2004-2010, 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 1 1 use strict;
+ 1
+11 1 1 use warnings;
+ 1
+12
+13 sub p
+14 {
+15 2 100 2 my $x = shift || 11;
+16 2 100 my $y = shift || [];
+17 2 100 my $z = shift || {};
+18 }
+19
+20 1 p $_, $_, $_ for 0, 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 Count Location
+---------- ----- ----------------------
+BEGIN 1 tests/default_param:10
+BEGIN 1 tests/default_param:11
+p 2 tests/default_param:15
+
+
@@ -0,0 +1,62 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/deparse 88.9 n/a n/a 75.0 84.6
+Total 88.9 n/a n/a 75.0 84.6
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/deparse
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl -l
+2
+3 # Copyright 2004-2010, 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 1 1 use strict;
+ 1
+11 1 1 use warnings;
+ 1
+12
+13 1 1 use B::Deparse;
+ 1
+14
+15 my $xx = sub
+16 {
+17 *** 0 0 print "xx";
+18 1 };
+19
+20 1 print B::Deparse->new->coderef2text($xx)
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- ----------------
+BEGIN 1 tests/deparse:10
+BEGIN 1 tests/deparse:11
+BEGIN 1 tests/deparse:13
+
+Uncovered Subroutines
+---------------------
+
+Subroutine Count Location
+---------- ----- ----------------
+__ANON__ 0 tests/deparse:17
+
+
@@ -0,0 +1,126 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/dynamic_subs 94.3 75.0 n/a 80.0 89.8
+Total 94.3 75.0 n/a 80.0 89.8
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/dynamic_subs
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2004-2010, 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 *** 0 0 sub unused { 0 }
+11 *** 0 0 sub empty { }
+12
+13 sub gen
+14 {
+15 4 4 my $x = shift;
+16 sub
+17 {
+18 5 5 my $y = shift;
+19 *** 5 50 return $x + $y if $y;
+20 }
+21 4 };
+22
+23 1 my $o = gen(1);
+24 1 my $p = $o->(7);
+25 1 my $q = $o->(8);
+26 1 my $r = gen(1)->(2);
+27 1 my $s = gen(3)->(4);
+28 1 my $t = gen(5)->(6);
+29
+30 1 print "$p, $q, $r, $s, $t\n";
+31
+32 1 for my $func (qw(f1 f2 f3))
+33 {
+34 1 1 no strict "refs";
+ 1
+35 *$func = sub
+36 {
+37 2 2 print "$func\n";
+38 }
+39 3 }
+40
+41 1 f1();
+42 1 f2();
+43
+44 sub AUTOLOAD
+45 {
+46 3 3 my $func = $AUTOLOAD;
+47 3 $func =~ s/^.*:://;
+48 1 1 no strict "refs";
+ 1
+49 3 100 if ($func eq "add")
+50 {
+51 *$func = sub
+52 {
+53 3 3 print "Add!\n";
+54 1 };
+55 }
+56 else
+57 {
+58 *$func = sub
+59 {
+60 2 2 print "$func\n";
+61 2 };
+62 }
+63 3 goto &$func
+64 }
+65
+66 1 add();
+67 1 add();
+68 1 add();
+69 1 qaz();
+70 1 wsx();
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+19 *** 50 5 0 if $y
+49 100 1 2 if ($func eq 'add') { }
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- ---------------------
+AUTOLOAD 3 tests/dynamic_subs:46
+BEGIN 1 tests/dynamic_subs:34
+BEGIN 1 tests/dynamic_subs:48
+__ANON__ 5 tests/dynamic_subs:18
+__ANON__ 2 tests/dynamic_subs:37
+__ANON__ 3 tests/dynamic_subs:53
+__ANON__ 2 tests/dynamic_subs:60
+gen 4 tests/dynamic_subs:15
+
+Uncovered Subroutines
+---------------------
+
+Subroutine Count Location
+---------- ----- ---------------------
+empty 0 tests/dynamic_subs:11
+unused 0 tests/dynamic_subs:10
+
+
@@ -0,0 +1,112 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/eval1 95.7 50.0 n/a 85.7 90.6
+Total 95.7 50.0 n/a 85.7 90.6
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/eval1
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2002-2010, 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 # __COVER__ skip_test $] == 5.010
+11 # __COVER__ skip_reason One test fails only under make test on 5.10.0 unhreaded
+12
+13 1 1 use strict;
+ 1
+14 1 1 use warnings;
+ 1
+15
+16 *** 1 50 1 use lib -d "t" ? "t" : "..";
+ 1
+17
+18 1 my $x;
+19
+20 1 3 eval <<'EOS';
+ 3
+ 3
+21 sub e
+22 {
+23 $x++;
+24 $x
+25 }
+26 EOS
+27
+28 1 2 eval <<'EOS';
+ *** 2 0
+ 2 3
+ *** 0
+ 3
+29 sub f
+30 {
+31 $x++;
+32 $x
+33 }
+34
+35 sub g
+36 {
+37 $x++;
+38 }
+39
+40 sub h
+41 {
+42 $x++;
+43 }
+44 EOS
+45
+46 1 e();
+47 1 e();
+48 1 e();
+49 1 f();
+50 1 f();
+51 1 h();
+52 1 h();
+53 1 h();
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+16 *** 50 1 0 -d 't' ? :
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- --------------
+BEGIN 1 tests/eval1:13
+BEGIN 1 tests/eval1:14
+BEGIN 1 tests/eval1:16
+e 3 tests/eval1:20
+f 2 tests/eval1:28
+h 3 tests/eval1:28
+
+Uncovered Subroutines
+---------------------
+
+Subroutine Count Location
+---------- ----- --------------
+g 0 tests/eval1:28
+
+
@@ -0,0 +1,79 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/eval2 94.1 50.0 50.0 100.0 82.1
+Total 94.1 50.0 50.0 100.0 82.1
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/eval2
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2004-2010, 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 1 1 use lib "tests";
+ 1
+11
+12 *** 1 50 $x = shift || 0;
+13 1 print "1 - $x\n";
+14 *** 1 50 if ($x) { eval 'use E2' }
+ *** 0
+15 1 print "3 - $x\n";
+16 *** 1 50 1 if ($x < 4) { eval 'use E3' }
+ 1
+ 1
+ 1
+17 1 print "4 - $x\n";
+18 *** 1 50 1 if ($x < 6) { eval 'use E4' }
+ 1
+ 1
+ 1
+19 1 print "5 - $x\n";
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+14 *** 50 0 1 if ($x)
+16 *** 50 1 0 if ($x < 4)
+18 *** 50 1 0 if ($x < 6)
+
+
+Conditions
+----------
+
+or 2 conditions
+
+line err % l !l expr
+----- --- ------ ------ ------ ----
+12 *** 50 0 1 shift @ARGV || 0
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- --------------
+BEGIN 1 tests/eval2:10
+BEGIN 1 tests/eval2:16
+BEGIN 1 tests/eval2:18
+
+
@@ -0,0 +1,80 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/eval3 88.9 50.0 50.0 100.0 79.3
+Total 88.9 50.0 50.0 100.0 79.3
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/eval3
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2004-2010, 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 1 1 use lib "tests";
+ 1
+11
+12 *** 1 50 $x = shift || 0;
+13 1 print "1 - $x\n";
+14 *** 1 50 if ($x) { eval 'sub s1 { print "s1\n" }'; s1() }
+ *** 0
+ *** 0
+15 1 print "3 - $x\n";
+16 *** 1 50 1 if ($x < 4) { eval 'sub s2 { print "s2\n" }'; s2() }
+ 1
+ 1
+ 1
+17 1 print "4 - $x\n";
+18 *** 1 50 1 if ($x < 6) { eval 'sub s3 { print "s3\n" }'; s3() }
+ 1
+ 1
+ 1
+19 1 print "5 - $x\n";
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+14 *** 50 0 1 if ($x)
+16 *** 50 1 0 if ($x < 4)
+18 *** 50 1 0 if ($x < 6)
+
+
+Conditions
+----------
+
+or 2 conditions
+
+line err % l !l expr
+----- --- ------ ------ ------ ----
+12 *** 50 0 1 shift @ARGV || 0
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- --------------
+BEGIN 1 tests/eval3:10
+s2 1 tests/eval3:16
+s3 1 tests/eval3:18
+
+
@@ -0,0 +1,98 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/eval3 100.0 100.0 100.0 100.0 100.0
+Total 100.0 100.0 100.0 100.0 100.0
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/eval3
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2004-2010, 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 4 4 use lib "tests";
+ 4
+11
+12 4 100 $x = shift || 0;
+13 4 print "1 - $x\n";
+14 4 100 3 if ($x) { eval 'sub s1 { print "s1\n" }'; s1() }
+ 3
+ 3
+ 3
+15 4 print "3 - $x\n";
+16 4 100 if ($x < 4) { eval 'sub s2 { print "s2\n" }'; s2() }
+ 1
+ 1
+17 4 print "4 - $x\n";
+18 4 100 4 if ($x < 6) { eval 'sub s3 { print "s3\n" }'; s3() }
+ 3
+ 3
+ 4
+19 4 print "5 - $x\n";
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+14 100 3 1 if ($x)
+16 100 1 3 if ($x < 4)
+18 100 3 1 if ($x < 6)
+
+
+Conditions
+----------
+
+or 2 conditions
+
+line err % l !l expr
+----- --- ------ ------ ------ ----
+12 100 3 1 shift @ARGV || 0
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- --------------
+BEGIN 4 tests/eval3:10
+s1 3 tests/eval3:14
+s3 4 tests/eval3:18
+
+
@@ -0,0 +1,100 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/eval2 100.0 100.0 100.0 100.0 100.0
+Total 100.0 100.0 100.0 100.0 100.0
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/eval2
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2004-2010, 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 4 4 use lib "tests";
+ 4
+11
+12 4 100 $x = shift || 0;
+13 4 print "1 - $x\n";
+14 4 100 2 if ($x) { eval 'use E2' }
+ 2
+ 2
+ 2
+15 4 print "3 - $x\n";
+16 4 100 2 if ($x < 4) { eval 'use E3' }
+ 2
+ 2
+ 2
+17 4 print "4 - $x\n";
+18 4 100 3 if ($x < 6) { eval 'use E4' }
+ 3
+ 3
+ 3
+19 4 print "5 - $x\n";
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+14 100 2 2 if ($x)
+16 100 2 2 if ($x < 4)
+18 100 3 1 if ($x < 6)
+
+
+Conditions
+----------
+
+or 2 conditions
+
+line err % l !l expr
+----- --- ------ ------ ------ ----
+12 100 2 2 shift @ARGV || 0
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- --------------
+BEGIN 4 tests/eval2:10
+BEGIN 2 tests/eval2:14
+BEGIN 2 tests/eval2:16
+BEGIN 3 tests/eval2:18
+
+
@@ -0,0 +1,91 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/if 83.3 50.0 n/a 100.0 73.3
+Total 83.3 50.0 n/a 100.0 73.3
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/if
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2004-2010, 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 1 1 use strict;
+ 1
+11 1 1 use warnings;
+ 1
+12
+13 1 my ($x, $p, $q, $r, $s);
+14
+15 1 $x = 0;
+16
+17 *** 1 50 if ($x)
+18 {
+19 *** 0 $p++
+20 }
+21
+22 *** 1 50 unless ($x)
+23 {
+24 1 $q++
+25 }
+26
+27 1 $x = 1;
+28
+29 *** 1 50 if ($x)
+30 {
+31 1 $r++
+32 }
+33
+34 *** 1 50 if ($x)
+35 {
+36 1 $r++
+37 }
+38 else
+39 {
+40 *** 0 $s++
+41 }
+42
+43 *** 1 50 unless ($x)
+44 {
+45 *** 0 $s++
+46 }
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+17 *** 50 0 1 if ($x)
+22 *** 50 1 0 unless ($x)
+29 *** 50 1 0 if ($x)
+34 *** 50 1 0 if ($x) { }
+43 *** 50 0 1 unless ($x)
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- -----------
+BEGIN 1 tests/if:10
+BEGIN 1 tests/if:11
+
+
@@ -0,0 +1,64 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/inc_sub 100.0 75.0 n/a 100.0 94.1
+Total 100.0 75.0 n/a 100.0 94.1
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/inc_sub
+
+line err stmt bran cond sub code
+1 #!/bin/perl
+2
+3 1 1 use lib ();
+ 1
+4
+5 BEGIN
+6 {
+7 lib->import
+8 (
+9 sub
+10 {
+11 3 100 return unless $_[1] eq "IncSub.pm";
+12 1 my $fh;
+13 *** 1 50 open $fh, "tests/IncSub.pm" or die $!;
+14 1 $fh
+15 }
+16 )
+17 1 1 }
+18
+19 1 1 use IncSub;
+ 1
+20
+21 1 IncSub::check
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+11 100 2 1 unless $_[1] eq 'IncSub.pm'
+13 *** 50 0 1 unless open $fh, 'tests/IncSub.pm'
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- ----------------
+BEGIN 1 tests/inc_sub:17
+BEGIN 1 tests/inc_sub:19
+BEGIN 1 tests/inc_sub:3
+
+
@@ -0,0 +1,145 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/Module1.pm 25.0 n/a n/a 25.0 25.0
+tests/module1 93.3 50.0 n/a 100.0 90.9
+Total 69.6 50.0 n/a 66.7 67.6
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/Module1.pm
+
+line err stmt bran cond sub code
+1 # Copyright 2002-2010, Paul Johnson (pjcj@cpan.org)
+2
+3 # This software is free. It is licensed under the same terms as Perl itself.
+4
+5 # The latest version of this software should be available from my homepage:
+6 # http://www.pjcj.net
+7
+8 package Module1;
+9
+10 my $y = 7;
+11 $y++;
+12
+13 sub _aa
+14 {
+15 *** 0 0 $y++;
+16 *** 0 die;
+17 *** 0 die;
+18 }
+19
+20 sub xx
+21 {
+22 *** 0 0 $y++;
+23 *** 0 die;
+24 }
+25
+26 sub yy
+27 {
+28 *** 0 0 $y++;
+29 }
+30
+31 sub zz
+32 {
+33 11 11 my $x = shift;
+34 11 $x++;
+35 }
+36
+37 1
+38
+39 __END__
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- -------------------
+zz 11 tests/Module1.pm:33
+
+Uncovered Subroutines
+---------------------
+
+Subroutine Count Location
+---------- ----- -------------------
+_aa 0 tests/Module1.pm:15
+xx 0 tests/Module1.pm:22
+yy 0 tests/Module1.pm:28
+
+
+tests/module1
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2002-2010, 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 # __COVER__ changes s/56.3/56.2/
+11
+12 1 1 use strict;
+ 1
+13 1 1 use warnings;
+ 1
+14
+15 1 1 use lib "tests";
+ 1
+16
+17 1 1 use Module1;
+ 1
+18
+19 1 my @x;
+20
+21 sub xx
+22 {
+23 11 11 $x[shift]++;
+24 11 Module1::zz(0);
+25 }
+26
+27 1 for (0 .. 10)
+28 {
+29 *** 11 50 if (time)
+30 {
+31 11 xx(0);
+32 }
+33 else
+34 {
+35 *** 0 $x[1]++;
+36 }
+37 }
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+29 *** 50 11 0 if (time) { }
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- ----------------
+BEGIN 1 tests/module1:12
+BEGIN 1 tests/module1:13
+BEGIN 1 tests/module1:15
+BEGIN 1 tests/module1:17
+xx 11 tests/module1:23
+
+
@@ -0,0 +1,145 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/Module2.pm 25.0 n/a n/a 25.0 25.0
+tests/module2 93.3 50.0 n/a 100.0 90.9
+Total 69.6 50.0 n/a 66.7 67.6
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/Module2.pm
+
+line err stmt bran cond sub code
+1 # Copyright 2002-2010, Paul Johnson (pjcj@cpan.org)
+2
+3 # This software is free. It is licensed under the same terms as Perl itself.
+4
+5 # The latest version of this software should be available from my homepage:
+6 # http://www.pjcj.net
+7
+8 package NotModule2;
+9
+10 my $y = 7;
+11 $y++;
+12
+13 sub _aa
+14 {
+15 *** 0 0 $y++;
+16 *** 0 die;
+17 *** 0 die;
+18 }
+19
+20 sub _xx
+21 {
+22 *** 0 0 $y++;
+23 *** 0 die;
+24 }
+25
+26 sub yy
+27 {
+28 *** 0 0 $y++;
+29 }
+30
+31 sub zz
+32 {
+33 11 11 my $x = shift;
+34 11 $x++;
+35 }
+36
+37 1
+38
+39 __END__
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- -------------------
+zz 11 tests/Module2.pm:33
+
+Uncovered Subroutines
+---------------------
+
+Subroutine Count Location
+---------- ----- -------------------
+_aa 0 tests/Module2.pm:15
+_xx 0 tests/Module2.pm:22
+yy 0 tests/Module2.pm:28
+
+
+tests/module2
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2002-2010, 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 # __COVER__ changes s/56.3/56.2/
+11
+12 1 1 use strict;
+ 1
+13 1 1 use warnings;
+ 1
+14
+15 1 1 use lib "tests";
+ 1
+16
+17 1 1 use Module2;
+ 1
+18
+19 1 my @x;
+20
+21 sub xx
+22 {
+23 11 11 $x[shift]++;
+24 11 NotModule2::zz(0);
+25 }
+26
+27 1 for (0 .. 10)
+28 {
+29 *** 11 50 if (time)
+30 {
+31 11 xx(0);
+32 }
+33 else
+34 {
+35 *** 0 $x[1]++;
+36 }
+37 }
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+29 *** 50 11 0 if (time) { }
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- ----------------
+BEGIN 1 tests/module2:12
+BEGIN 1 tests/module2:13
+BEGIN 1 tests/module2:15
+BEGIN 1 tests/module2:17
+xx 11 tests/module2:23
+
+
@@ -0,0 +1,76 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/module_ignore 100.0 100.0 n/a 100.0 100.0
+Total 100.0 100.0 n/a 100.0 100.0
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/module_ignore
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2006-2010, 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 # __COVER__ ignore Module1
+11
+12 1 1 use strict;
+ 1
+13 1 1 use warnings;
+ 1
+14
+15 1 1 use lib "tests";
+ 1
+16
+17 1 1 use Module1;
+ 1
+18
+19 1 my @x;
+20
+21 1 for (0 .. 10)
+22 {
+23 11 100 if (Module1::zz($_))
+24 {
+25 10 $x[0]++;
+26 }
+27 else
+28 {
+29 1 $x[1]++;
+30 }
+31 }
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+23 100 10 1 if (Module1::zz($_)) { }
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- ----------------------
+BEGIN 1 tests/module_ignore:12
+BEGIN 1 tests/module_ignore:13
+BEGIN 1 tests/module_ignore:15
+BEGIN 1 tests/module_ignore:17
+
+
@@ -0,0 +1,73 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/Module_import.pm 100.0 n/a n/a 100.0 100.0
+tests/module_import 100.0 n/a n/a 100.0 100.0
+Total 100.0 n/a n/a 100.0 100.0
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/Module_import.pm
+
+line err stmt bran cond sub code
+1 # Copyright 2002-2010, Paul Johnson (pjcj@cpan.org)
+2
+3 # This software is free. It is licensed under the same terms as Perl itself.
+4
+5 # The latest version of this software should be available from my homepage:
+6 # http://www.pjcj.net
+7
+8 package Module_import;
+9
+10 sub import
+11 {
+12 1 1 print "Module_import\n";
+13 }
+14
+15 1
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- -------------------------
+import 1 tests/Module_import.pm:12
+
+
+tests/module_import
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2002-2010, 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 1 1 BEGIN { push @INC, "tests" }
+11
+12 1 1 use Module_import;
+ 1
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- ----------------------
+BEGIN 1 tests/module_import:10
+BEGIN 1 tests/module_import:12
+
+
@@ -0,0 +1,81 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/Module_import.pm 100.0 n/a n/a 100.0 100.0
+tests/module_relative 100.0 n/a n/a 100.0 100.0
+Total 100.0 n/a n/a 100.0 100.0
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/Module_import.pm
+
+line err stmt bran cond sub code
+1 # Copyright 2002-2010, Paul Johnson (pjcj@cpan.org)
+2
+3 # This software is free. It is licensed under the same terms as Perl itself.
+4
+5 # The latest version of this software should be available from my homepage:
+6 # http://www.pjcj.net
+7
+8 package Module_import;
+9
+10 sub import
+11 {
+12 1 1 print "Module_import\n";
+13 }
+14
+15 1
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- -------------------------
+import 1 tests/Module_import.pm:12
+
+
+tests/module_relative
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2002-2010, 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 # __COVER__ skip_test $] < 5.008 || $^O eq "cygwin"
+11 # __COVER__ skip_reason Busted on 5.6 and cygwin
+12
+13 1 1 BEGIN { chdir "tests/random/dir" }
+14 1 1 use lib "../..";
+ 1
+15 1 1 use strict;
+ 1
+16 1 1 use Module_import;
+ 1
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- ------------------------
+BEGIN 1 tests/module_relative:13
+BEGIN 1 tests/module_relative:14
+BEGIN 1 tests/module_relative:15
+BEGIN 1 tests/module_relative:16
+
+
@@ -0,0 +1,72 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/overload_bool 55.6 50.0 n/a 25.0 46.7
+Total 55.6 50.0 n/a 25.0 46.7
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/overload_bool
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2006-2010, 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 package Foo;
+11 use overload
+12 *** 0 0 '""' => sub { shift->render},
+13 1 1 bool => sub { die; 1 };
+ *** 1 0
+ *** 0
+ *** 0
+14
+15 sub render {
+16 *** 0 0 "foo";
+17 }
+18
+19 1 my $foo = 1;
+20 *** 1 50 bless {}, 'Foo' if $foo;
+21
+22 1 1;
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+20 *** 50 1 0 if $foo
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- ----------------------
+BEGIN 1 tests/overload_bool:13
+
+Uncovered Subroutines
+---------------------
+
+Subroutine Count Location
+---------- ----- ----------------------
+__ANON__ 0 tests/overload_bool:12
+__ANON__ 0 tests/overload_bool:13
+render 0 tests/overload_bool:16
+
+
@@ -0,0 +1,66 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/overloaded 100.0 50.0 n/a 100.0 93.3
+Total 100.0 50.0 n/a 100.0 93.3
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/overloaded
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2003-2010, 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 # Example stolen from overload documentation
+11
+12 package two_face;
+13
+14 1 1 sub new { my $p = shift; bless [@_], $p }
+ 1
+15 1 1 use overload '""' => \&str, '0+' => \&num, fallback => 1;
+ 1
+16 2 2 sub num {shift->[1]}
+17 2 2 sub str {shift->[0]}
+18
+19 package main;
+20
+21 1 my $seven = new two_face ("vii", 7);
+22 1 printf "seven=$seven, seven=%d, eight=%d\n", $seven, $seven+1;
+23 *** 1 50 print "seven contains `i'\n" if $seven =~ /i/;
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+23 *** 50 1 0 if $seven =~ /i/
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- -------------------
+BEGIN 1 tests/overloaded:15
+new 1 tests/overloaded:14
+num 2 tests/overloaded:16
+str 2 tests/overloaded:17
+
+
@@ -0,0 +1,53 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/require 100.0 50.0 n/a 100.0 88.9
+Total 100.0 50.0 n/a 100.0 88.9
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/require
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2002-2010, 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 *** 1 50 1 use lib -d "t" ? "." : "..";
+ 1
+11 1 1 use File::Spec;
+ 1
+12 1 require File::Spec->catfile("tests", "E2.pm");
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+10 *** 50 1 0 -d 't' ? :
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- ----------------
+BEGIN 1 tests/require:10
+BEGIN 1 tests/require:11
+
+
@@ -0,0 +1,103 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/sort 95.7 n/a n/a 85.7 93.3
+Total 95.7 n/a n/a 85.7 93.3
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/sort
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl -w
+2
+3 1 1 use strict;
+ 1
+4
+5 1 my %sort =
+6 (
+7 B => \&backwards,
+8 F => \&forwards
+9 );
+10
+11 sub backwards
+12 {
+13 6 6 return $b cmp $a;
+14 }
+15
+16 sub forwards
+17 {
+18 *** 0 0 return $a cmp $b;
+19 }
+20
+21 sub GetAlgorithm
+22 {
+23 1 1 my ($alg) = @_;
+24 1 return $sort{$alg};
+25 }
+26
+27 1 my @list = qw( a d e c g );
+28
+29 # my $alg = GetAlgorithm(('B', 'F')[int(rand(2))]);
+30 1 my $alg = GetAlgorithm(('B', 'F')[0]);
+31
+32 1 @list = sort {&{$alg}} @list;
+ 6
+ 6
+33
+34 1 1 use Data::Dumper;
+ 1
+35
+36 1 print STDERR Dumper(\@list);
+37
+38 package Failure;
+39
+40 sub fail
+41 {
+42 1 1 my @x = 1 .. 5;
+43 1 my @y = sort { Failure->xyz( $a, $b ) } @x;
+ 8
+44 }
+45
+46 sub xyz
+47 {
+48 8 8 my $self = shift;
+49 8 my ($a, $b) = @_;
+50 8 $a <=> $b;
+51 }
+52 package main;
+53
+54 1 my @l = Failure->fail;
+55
+56 1 print STDERR Dumper(\@l);
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+------------ ----- -------------
+BEGIN 1 tests/sort:3
+BEGIN 1 tests/sort:34
+GetAlgorithm 1 tests/sort:23
+backwards 6 tests/sort:13
+fail 1 tests/sort:42
+xyz 8 tests/sort:48
+
+Uncovered Subroutines
+---------------------
+
+Subroutine Count Location
+------------ ----- -------------
+forwards 0 tests/sort:18
+
+
@@ -0,0 +1,72 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/special_blocks 100.0 n/a n/a 100.0 100.0
+Total 100.0 n/a n/a 100.0 100.0
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/special_blocks
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2002-2010, 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 1 1 use strict;
+ 1
+11 1 1 use warnings;
+ 1
+12
+13 1 my $x;
+14
+15 BEGIN
+16 {
+17 1 1 $x++
+18 }
+19
+20 CHECK
+21 {
+22 1 1 $x++
+23 }
+24
+25 INIT
+26 {
+27 1 1 $x++
+28 }
+29
+30 END
+31 {
+32 1 1 $x++
+33 }
+34
+35 1 $x++;
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- -----------------------
+BEGIN 1 tests/special_blocks:10
+BEGIN 1 tests/special_blocks:11
+BEGIN 1 tests/special_blocks:17
+CHECK 1 tests/special_blocks:22
+END 1 tests/special_blocks:32
+INIT 1 tests/special_blocks:27
+
+
@@ -0,0 +1,98 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/t0 93.3 62.5 66.7 100.0 82.1
+Total 93.3 62.5 66.7 100.0 82.1
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/t0
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2002-2010, 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 1 1 use strict;
+ 1
+11 1 1 use warnings;
+ 1
+12
+13 1 my @x;
+14
+15 1 my $y = 1;
+16
+17 1 for (0 .. 10)
+18 {
+19 *** 11 50 $y &&
+20 $x[1]++;
+21
+22 *** 11 100 66 $y &&
+23 $x[0]++ &&
+24 $x[1]++;
+25
+26 *** 11 50 $x[2]++
+27 if $y;
+28
+29 11 for (0 .. 2)
+30 {
+31 33 $x[3]++;
+32 }
+33
+34 *** 11 50 if ($y)
+35 {
+36 11 $x[4]++;
+37 }
+38 else
+39 {
+40 *** 0 $x[5]++;
+41 }
+42 }
+43
+44 # print join(", ", @x), "\n";
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+19 *** 50 11 0 if $y
+22 100 10 1 if $y and $x[0]++
+26 *** 50 11 0 if $y
+34 *** 50 11 0 if ($y) { }
+
+
+Conditions
+----------
+
+and 3 conditions
+
+line err % !l l&&!r l&&r expr
+----- --- ------ ------ ------ ------ ----
+22 *** 66 0 1 10 $y and $x[0]++
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- -----------
+BEGIN 1 tests/t0:10
+BEGIN 1 tests/t0:11
+
+
@@ -0,0 +1,54 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/t1 100.0 n/a n/a 100.0 100.0
+Total 100.0 n/a n/a 100.0 100.0
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/t1
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2002-2010, 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 1 1 use strict;
+ 1
+11 1 1 use warnings;
+ 1
+12
+13 1 my @x;
+14
+15 sub xx
+16 {
+17 1 1 $x[shift]++;
+18 }
+19
+20 1 xx(4);
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- -----------
+BEGIN 1 tests/t1:10
+BEGIN 1 tests/t1:11
+xx 1 tests/t1:17
+
+
@@ -0,0 +1,85 @@
+Reading database from ...
+
+
+------------------------------------------ ------ ------ ------ ------ ------
+File stmt bran cond sub total
+------------------------------------------ ------ ------ ------ ------ ------
+tests/t2 92.9 50.0 n/a 100.0 82.6
+Total 92.9 50.0 n/a 100.0 82.6
+------------------------------------------ ------ ------ ------ ------ ------
+
+
+Run: ...
+Perl version: ...
+OS: ...
+Start: ...
+Finish: ...
+
+tests/t2
+
+line err stmt bran cond sub code
+1 #!/usr/bin/perl
+2
+3 # Copyright 2002-2010, 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 1 1 use strict;
+ 1
+11 1 1 use warnings;
+ 1
+12
+13 1 my @x;
+14
+15 sub xx
+16 {
+17 11 11 $x[shift]++;
+18 }
+19
+20 1 for (0 .. 10)
+21 {
+22 time &&
+23 *** 11 50 $x[1]++;
+24
+25 *** 11 50 $x[2]++
+26 if time;
+27
+28 11 for (0 .. 2)
+29 {
+30 33 $x[3]++;
+31 }
+32
+33 *** 11 50 if (time)
+34 {
+35 11 xx(4);
+36 }
+37 else
+38 {
+39 *** 0 $x[5]++;
+40 }
+41 }
+
+
+Branches
+--------
+
+line err % true false branch
+----- --- ------ ------ ------ ------
+23 *** 50 11 0 if time
+25 *** 50 11 0 if time
+33 *** 50 11 0 if (time) { }
+
+
+Covered Subroutines
+-------------------
+
+Subroutine Count Location
+---------- ----- -----------
+BEGIN 1 tests/t2:10
+BEGIN 1 tests/t2:11
+xx 11 tests/t2:17
+
+
@@ -12,8 +12,8 @@ use warnings;
use File::Copy;
-use Devel::Cover::Inc 0.71;
-use Devel::Cover::Test 0.71;
+use Devel::Cover::Inc 0.72;
+use Devel::Cover::Test 0.72;
my $base = $Devel::Cover::Inc::Base;
diff --git a/var/tmp/source/PJCJ/Devel-Cover-0.71/Devel-Cover-0.71/tests/cond_and b/var/tmp/source/PJCJ/Devel-Cover-0.72/Devel-Cover-0.72/tests/cond_and
old mode 100755
new mode 100644
diff --git a/var/tmp/source/PJCJ/Devel-Cover-0.71/Devel-Cover-0.71/tests/eval1 b/var/tmp/source/PJCJ/Devel-Cover-0.72/Devel-Cover-0.72/tests/eval1
old mode 100755
new mode 100644
@@ -10,7 +10,7 @@
use strict;
use warnings;
-use Devel::Cover::Test 0.71;
+use Devel::Cover::Test 0.72;
my $run_test = sub
{
@@ -10,7 +10,7 @@
use strict;
use warnings;
-use Devel::Cover::Test 0.71;
+use Devel::Cover::Test 0.72;
my $run_test = sub
{
@@ -12,8 +12,8 @@ use warnings;
use File::Copy;
-use Devel::Cover::Inc 0.71;
-use Devel::Cover::Test 0.71;
+use Devel::Cover::Inc 0.72;
+use Devel::Cover::Test 0.72;
my $base = $Devel::Cover::Inc::Base;
diff --git a/var/tmp/source/PJCJ/Devel-Cover-0.71/Devel-Cover-0.71/tests/module1 b/var/tmp/source/PJCJ/Devel-Cover-0.72/Devel-Cover-0.72/tests/module1
old mode 100755
new mode 100644
diff --git a/var/tmp/source/PJCJ/Devel-Cover-0.71/Devel-Cover-0.71/tests/module2 b/var/tmp/source/PJCJ/Devel-Cover-0.72/Devel-Cover-0.72/tests/module2
old mode 100755
new mode 100644
diff --git a/var/tmp/source/PJCJ/Devel-Cover-0.71/Devel-Cover-0.71/tests/t0 b/var/tmp/source/PJCJ/Devel-Cover-0.72/Devel-Cover-0.72/tests/t0
old mode 100755
new mode 100644
diff --git a/var/tmp/source/PJCJ/Devel-Cover-0.71/Devel-Cover-0.71/tests/t1 b/var/tmp/source/PJCJ/Devel-Cover-0.72/Devel-Cover-0.72/tests/t1
old mode 100755
new mode 100644
diff --git a/var/tmp/source/PJCJ/Devel-Cover-0.71/Devel-Cover-0.71/tests/t2 b/var/tmp/source/PJCJ/Devel-Cover-0.72/Devel-Cover-0.72/tests/t2
old mode 100755
new mode 100644
@@ -10,7 +10,7 @@ package Devel::Cover::BuildUtils;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use Exporter;
@@ -77,7 +77,7 @@ Huh?
=head1 VERSION
-Version 0.71 - 10th September 2010
+Version 0.72 - 27th September 2010
=head1 LICENCE
@@ -40,7 +40,8 @@ sub get_options
[ map { ($_, "$_-thr") }
qw( 5.6.1 5.6.2
5.8.0 5.8.1 5.8.2 5.8.3 5.8.4 5.8.5 5.8.6 5.8.7 5.8.8 5.8.9
- 5.10.0 5.10.1 5.11.0 5.12.0 5.12.1 5.12.2 5.13.4 ) ]
+ 5.10.0 5.10.1 5.11.0 5.12.0 5.12.1 5.12.2
+ 5.13.0 5.13.1 5.13.2 5.13.3 5.13.4 5.13.5 ) ]
unless @{$Options->{version}};
$Silent = " >/dev/null 2>&1" if $Options->{silent};
$Options->{version} =
@@ -12,14 +12,14 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.71";
+our $VERSION = "0.72";
use blib;
use Config;
exit if $Config{useithreads};
-use Devel::Cover::Test 0.71;
+use Devel::Cover::Test 0.72;
my @tests = @ARGV;
@@ -10,16 +10,17 @@
use strict;
use warnings;
-require 5.010_001;
+require 5.012;
-# use autodie;
+use autodie;
use System "sys:dsys: command, error";
my @opt = qw( perl modules
- zlib gd openssl nagios
+ postgres
+ zlib openssl
apache mod_perl fastcgi
- git subversion postgres
+ git
coverage all );
my $Usage =
@@ -31,31 +32,12 @@ my $Installation = shift || die $Usage;
my $Options = "@ARGV";
$Options = "dry" if $Options =~ /\bdry\b/;
$Options = "@opt" if $Options =~ /\ball\b/;
- pop @opt for 1 .. 4;
+ pop @opt for 1 .. 8;
$Options = "@opt" unless $Options;
my $Sw;
my $Perl;
-my $UBS = -d "/opt/bin";
-if ($UBS)
-{
- $ENV{PATH} = "/usr/bin:/usr/sbin:/bin:/sbin:/usr/ucb:" .
- "/usr/ccs/bin:/usr/ccs/lib:/usr/openwin/bin";
- $ENV{ORACLE_HOME} = `op chile_db oracle_home`;
- $ENV{ORACLE_HOME} ||= "/export/opt/p2orstree/10.1.0.4";
- $ENV{ORACLE_HOME} = "/app/ora/p2orstree/10.1.0.4"
- unless -e $ENV{ORACLE_HOME};
- $ENV{LD_LIBRARY_PATH} = "$ENV{ORACLE_HOME}/lib32:/usr/ucblib";
-}
-else
-{
- # $ENV{ORACLE_HOME} = "/usr/lib/oracle/xe/app/oracle/product/10.2.0/server";
- # die "ORACLE_HOME needs to be set!" unless exists $ENV{ORACLE_HOME};
- # die "ORACLE_HOME is invalid!" unless -d $ENV{ORACLE_HOME};
- # $ENV{LD_LIBRARY_PATH} = "$ENV{LD_LIBRARY_PATH}:$ENV{ORACLE_HOME}/lib";
-}
-
my $Top = `pwd`;
chomp $Top;
my $Build = "$Top/build";
@@ -85,7 +67,7 @@ sub building ($)
sub uncompress
{
- $_[0] =~ /2$/ ? "bzcat" : $UBS ? "gzcat" : "zcat"
+ $_[0] =~ /2$/ ? "bzcat" : "zcat"
}
sub build ($$$)
@@ -117,23 +99,15 @@ sub build ($$$)
print "built $module\n";
}
-sub feed ($$)
-{
- my ($command, $input) = @_;
- open my $c, "| $command" or die "Cannot run $command:$!\n";
- print $c $input;
- close $c or die "Cannot run $command:$!\n";
-}
-
sub main ()
{
dsys "rm -rf $Build";
- mkdir $Build, 0750 or die "Can't mkdir $Build: $!";
+ mkdir $Build, 0750;
$ENV{HOME} = $Sw;
- my $gmake = "/app/home/t136103/g/sw/bin/gmake";
- $gmake = "make" unless -e $gmake;
+ my $gmake = "make";
- if (building "perl")
+
+ if (building "perl" && (!-e "$Sw/bin/perl" || building "force"))
{
chdir $Build or die "Can't chdir $Build: $!";
dsys "rm -rf $Sw/*";
@@ -142,7 +116,7 @@ sub main ()
{
my $perl_dir = "/usr/local/pkg/bleadperl";
mkdir $perl_dir;
- chdir $perl_dir or die "Can't chdir $perl_dir: $!";
+ chdir $perl_dir;
dsys "rsync -avz --delete " .
"rsync://ftp.activestate.com/perl-current/ .";
}
@@ -150,7 +124,7 @@ sub main ()
{
my $perl_dir = "$Installation/tmp/maintperl";
dsys "mkdir -p $perl_dir";
- chdir $perl_dir or die "Can't chdir $perl_dir: $!";
+ chdir $perl_dir;
if (1)
{
dsys "rsync -avz --delete " .
@@ -178,8 +152,7 @@ sub main ()
my @opts =
(
- "-Dperladmin=" .
- ($UBS ? "'paul-za.johnson\@ubs.com'" : "'paul\@pjcj.net'"),
+ "-Dperladmin='paul\@pjcj.net'",
"-Dprefix=$Sw",
);
push @opts, "-Dusedevel" if $Blead;
@@ -190,14 +163,15 @@ sub main ()
"-Dldflags='-fprofile-arcs -ftest-coverage'",
"-Doptimize='-g -O0'",
) if building "Xcoverage";
+ push @opts, "-A ccflags=-fPIC";
dsys "sh ./Configure -des @opts";
dsys "make" . (building "Xcoverage" ? " perl.gcov" : "");
- sys "make test";
- dsys "make install";
+ dsys "HARNESS_OPTIONS=j$ENV{TEST_JOBS}:c make -j$ENV{TEST_JOBS} test_harness install";
+ # dsys "make install";
my ($version) = glob "${Perl}5.*";
- symlink $version, $Perl;
+ symlink $version, $Perl unless -e $Perl;
$Options =~ s/\bperl\b//;
}
@@ -208,9 +182,10 @@ sub main ()
print "<$restart [$^X] [$Perl]>\n";
exec $restart if $^X !~ /$Perl/;
+
if (building "zlib")
{
- my $zlib = "zlib-1.2.3";
+ my $zlib = "zlib-1.2.5";
build $zlib,
$Src_dir,
{
@@ -219,61 +194,19 @@ sub main ()
};
}
- if (building "gd")
- {
- my $jpeg = "jpegsrc.v6b";
- my $jpegdir = "jpeg-6b";
- build $jpeg,
- $Src_dir,
- {
- dir => sub { $jpegdir },
- config => sub { dsys "./configure --prefix=$Sw" },
- install => sub
- {
- dsys "make install install-lib install-headers";
- },
- };
-
- my $png = "libpng-1.2.34";
- build $png,
- $Src_dir,
- {
- config => sub
- {
- my $ext = $UBS ? "32sunu" : "linux";
- dsys "cp scripts/makefile.$ext Makefile";
- dsys "perl -pi -e 's|^(prefix=).*|\$1$Sw|' Makefile";
- dsys "make" .
- " ZLIBLIB=$Sw/lib" .
- " ZLIBINC=$Sw/include";
- }
- };
-
- my $gd = "gd-2.0.35";
- build $gd,
- $Src_dir,
- {
- config => sub
- {
- dsys "./configure" .
- " --prefix=$Sw" .
- " --with-jpeg=$Sw" .
- " --with-png=$Sw";
- }
- };
- }
if (building "openssl")
{
# my $openssl = "openssl-0.9.8g"; # Crypt::SSLeay fails
- my $openssl = "openssl-0.9.7" . ($UBS ? "g" : "j"); # Solaris fails
+ my $openssl = "openssl-0.9.7j";
# my $openssl = "openssl-0.9.8j";
build $openssl,
$Src_dir,
{ config => sub { dsys "./config --prefix=$Sw shared" } };
}
- $ENV{LD_PRELOAD} = "$Sw/lib/libssl.so" if -e "$Sw/lib/libssl.so" && !$UBS;
+ $ENV{LD_PRELOAD} = "$Sw/lib/libssl.so" if -e "$Sw/lib/libssl.so";
+
# my $apache = "apache_1.3.41";
my $apache = "httpd-2.2.11";
@@ -349,6 +282,7 @@ sub main ()
if building "mod_perl";
}
+
if (building "fastcgi" && -e "$Sw/bin/httpd")
{
my $fastcgi = "mod_fastcgi-2.4.6";
@@ -372,9 +306,10 @@ sub main ()
}
}
+
if (building "git")
{
- my $git = "git-1.6.3.3";
+ my $git = "git-1.6.3.3";
build $git,
$Src_dir,
@@ -385,126 +320,12 @@ sub main ()
test => sub { dsys "echo $gmake test" },
install => sub { dsys "$gmake install" },
}
- }
-
- if (building "subversion")
- {
- my $neon = "neon-0.25.5"; # subversion needs this version
- # build $neon,
- # $Src_dir,
- # {
- # config => sub
- # {
- # dsys "./configure" .
- # " --prefix=$Sw" .
- # ($UBS ? "" : " --enable-shared") .
- # " --with-ssl=openssl" .
- # " --with-libs=$Sw";
- # },
- # };
-
- my $swig = "swig-1.3.29"; # subversion needs a version after 1.3.23
- build $swig,
- $Src_dir,
- {
- config => sub
- {
- dsys "./configure" .
- " --prefix=$Sw" .
- " --with-perl5=$Perl"
- },
- make => sub { dsys "$gmake" },
- test => sub {},
- install => sub { dsys "$gmake install" },
- };
-
- die "Can't find swig" unless `which swig`;
-
- my $subversion = "subversion-1.4.5";
- build $subversion,
- $Src_dir,
- {
- config => sub
- {
- dsys "./configure" .
- " --prefix=$Sw" .
- " --without-berkeley-db" .
- ($UBS ? " --without-ssl --without-zlib"
- : " --with-ssl --with-zlib") .
- " --enable-shared" .
- " --with-apxs=$Sw/bin/apxs" .
- " --with-libs=$Sw" .
- " PERL=$Perl";
- },
- make => sub
- {
- dsys "make";
- dsys "make swig-pl";
- },
- test => sub
- {
- dsys "make check-swig-pl";
- },
- install => sub
- {
- dsys "make install";
- dsys "make install-swig-pl";
- },
- };
}
- if (building "nagios")
- {
- my $nagios = "nagios-3.0.6";
- build $nagios,
- $Src_dir,
- {
- config => sub
- {
- my $user = getpwuid($<);
- my $group = getgrgid($();
- {
- local ($^I, @ARGV) = (".bak", "cgi/status.c");
- while (<>)
- {
- s/(int max_grid_width=)8;/${1}135;/;
- s/(current_item)\+\+;/${1}+=strlen\(temp_servicestatus->description\)+1;/;
- print;
- }
- }
- sys "chdir common && ln -s ../base/snprintf.o .";
- dsys "./configure" .
- " --prefix=$Sw" .
- " --with-htmurl=/chile_monitor" .
- " --with-cgiurl=/chile_monitor/cgi-bin" .
- " --with-nagios-user=$user" .
- " --with-nagios-group=$group" .
- " --with-gd-inc=$Sw/include" .
- " --with-gd-lib=$Sw/lib";
- },
- make => sub
- {
- sys "make all install";
- },
- };
-
- my $plugins = "nagios-plugins-1.4.13";
- build $plugins,
- $Src_dir,
- {
- config => sub
- {
- dsys "CFLAGS=-lm ./configure" .
- " --prefix=$Sw" .
- " --with-cgiurl=/chile_monitor/cgi-bin"
- },
- test => sub {},
- };
- }
if (building "postgres")
{
- my $postgres = "postgresql-8.4.0";
+ my $postgres = "postgresql-8.4.4";
build $postgres,
$Src_dir,
{
@@ -514,12 +335,14 @@ sub main ()
" --prefix=$Sw" .
" --with-pgport=5433" .
" --without-readline" .
+ " --without-zlib" .
" --with-perl";
},
make => sub { dsys "$gmake" },
test => sub { dsys "$gmake check" },
install => sub { dsys "$gmake install-strip" },
- };
+ }
+ unless -e "$Sw/bin/pg_ctl" && !building "force";
}
@@ -527,486 +350,267 @@ sub main ()
{
my @modules =
qw(
- Bundle::CPAN
- Bundle::LWP
- CPAN::Mini
-
- LWP
- ExtUtils::ParseXS
- Module::Build
- Test::Pod
- Test::Pod::Coverage
- Archive::Tar
- Data::Page
- Date::Calc
- Apache::Compress
- Apache::Filter
- Apache::Session
- Apache::Test
- Data::UUID
- DateTime
- Class::Trigger
- DBIx::ContextualFetch
- DBIx::Class
DBIx::Class::InflateColumn::DateTime
- DBIx::ProcedureCall
- Image::Size
Template
- Number::Format
- Template::Plugin::Number::Format
- HTML::Lint
- JSON
- Test::JSON
- HTTP::Response::Encoding
- WWW::Mechanize
- Test::WWW::Mechanize
- PPI::HTML
- Perl::Tidy
- Devel::Cover
- Shell::Source
- B::Utils
- Log::Log4perl
- DBIx::Log4perl
- Net::Server
- XXNet::IRC
- File::Find::Rule
- Proc::ProcessTable
- Text::Template
- Data::Dump::Streamer
- Spreadsheet::ParseExcel
- Email::Send
- Text::Table
- Text::TabularDisplay
- C::Scan
- Cache::FastMmap
-
- XXCGI::Simple::Cookie
- XXData::Dump
- XXModule::Pluggable
-
- DBD:Pg
+ DBD::Pg
DBIx::Class::Schema::Loader::DBI::Pg
- MooseX::Declare
-
Catalyst
- Catalyst::Controller::FormBuilder
Catalyst::Devel
- Catalyst::Engine::Apache
- Catalyst::Engine::HTTP::POE
+ Catalyst::Engine::PSGI
Catalyst::Model::DBIC::Schema
Catalyst::Plugin::Authentication
- Catalyst::Plugin::Authentication::Store::DBIx::Class
Catalyst::Plugin::Authorization::Roles
Catalyst::Plugin::ConfigLoader
- Catalyst::Plugin::JSONRPC
- Catalyst::Plugin::Server::XMLRPC
Catalyst::Plugin::Session::State::Cookie
Catalyst::Plugin::Session::Store::FastMmap
Catalyst::Plugin::StackTrace
Catalyst::Plugin::Static::Simple
- Catalyst::Plugin::XMLRPC
Catalyst::View::JSON
Catalyst::View::TT
- FCGI
- FCGI::ProcManager
- SOAP::Lite
- Sort::Versions
- Alien::SeleniumRC
- Test::WWW::Selenium
- Test::WWW::Mechanize::Catalyst
- HTML::TagCloud
+ MooseX::Declare
- Test::Exception
- Test::Warn
+ Starman
+
+ Gitalist
- Date::Parse
-
- Net::SSLeay
- ); my @no = qw(
-
- DBIx::Class::Schema::Loader::DBI::Oracle
-
- XXBundle::Test XX_seems_to_want_to_reinstall_perl_itself
- Plagger
- XXBundle::BioPerl
- XXBio::Perl
- S/SE/SENDU/bioperl-1.5.2_102.tar.gz
- Tk
- Regexp::Common
- XXBundle::POE::All
- XXBundle::Email
- XXBundle::Phalanx
- XXBundle::HTML::Mason
- XXBundle::Slash
- XXBundle::RT
- XXBundle::Bricolage
- XXBundle::BricolagePlus
-
- XXPhalanx
+ Devel::Cover
+ Parallel::Iterator
+ Test::Pod::Coverage
+
+ ../..
+
+ Gedcom
+ Shell::Source
+
+ XX-Top-Level-Modules-With-Many-Dependencies
+ MojoMojo
+ Jifty
+ Dist::Zilla
+ Bot::BasicBot
+
+ XX-Modules-With-Many-Dependents
+ Exporter
+ Text::Tabs
Test::Harness
- Test::Reporter
- Test::Builder
- Test::Builder::Tester
- Sub::Uplevel
- Test::Exception
- Test::Tester
- Test::NoWarnings
- Test::Tester
Pod::Escapes
Pod::Simple
- Test::Pod
- YAML
- Cwd
- Archive::Tar
+ IO
+ Getopt::Long
+ Pod::Parser
+ ExtUtils::MakeMaker
+ Test::Simple
+ ExtUtils::Manifest
+ constant
+ Test
+ Data::Dumper
+ File::Temp
+ ExtUtils::Install
+ Text::ParseWords
+ ExtUtils::CBuilder
+ ExtUtils::ParseXS
Module::Build
- Devel::Symdump
- Pod::Coverage
- Test::Pod::Coverage
- Compress::Zlib
- IO::Zlib
- Archive::Zip
- Archive::Tar
- Storable
+ File::Path
+ XSLoader
+ MIME::Base64
+ Digest
Digest::MD5
+ Sub::Uplevel
URI
+ Test::Exception
HTML::Tagset
HTML::Parser
- LWP
- IPC::Run
- CPANPLUS
- DBI
- XXDBD::mysql
- GD
- MIME::Base64
- XXNet::SSLeay
- Net::LDAP
- XML::Parser
- Apache::ASP
- CGI
- Date::Manip
- DBD::Oracle
- XXDBD::Pg
- Digest::SHA1
- Digest::HMAC
- HTML::Tagset
- HTML::Template
- Net::Cmd
- Mail::Mailer
- MIME::Body
- Net::DNS
+ Compress::Raw::Zlib
+ Compress::Raw::Bzip2
+ Storable
+ base
+ List::MoreUtils
+ Params::Util
+ Task::Weaken
+ Sub::Install
+ Data::OptList
+ Sub::Exporter
+ Test::Tester
+ Test::NoWarnings
+ Attribute::Handlers
+ Class::Accessor
+ Algorithm::C3
+ Class::C3
+ Sub::Name
+ MRO::Compat
Time::HiRes
- Apache::DBI
- Apache::Session
- Apache::Test
- AppConfig
- App::Info
- XXAuthen::PAM
- Authen::SASL
- XXBerkeleyDB
- Bit::Vector
+ Params::Validate
+ Try::Tiny
+ Scope::Guard
+ Package::Stash
+ version
+ Tree::DAG_Node
+ Test::Warn
+ Devel::GlobalDestruction
+ Class::MOP
+ Moose
+ Class::Data::Inheritable
+ Test::Deep
Carp::Clan
- Chart::Bars
- Class::DBI
- Compress::Zlib::Perl
- Config::IniFiles
- Convert::ASN1
- Convert::TNEF
- Convert::UUlib
- CPAN
- Crypt::CBC
- Crypt::DES
- Crypt::SSLeay
- Data::Dumper
- Date::Calc
- DateTime
- XXDBD::DB2
- XXDBD::ODBC
- XXDBD::SQLite
- XXDBD::Sybase
- Device::SerialPort
- Digest::SHA
+ Module::Pluggable
+ Variable::Magic
+ B::Hooks::EndOfScope
+ Sub::Identify
+ namespace::clean
+ Time::Local
+ DBI
+ Text::Balanced
+ Class::Inspector
+ Test::Pod
Encode
- Event
- Excel::Template
- Expect
+ Path::Class
+ Digest::SHA1
+ FCGI
+ CGI
+ MooseX::Types
+ XML::NamespaceSupport
+ XML::SAX
+ Class::Singleton
+ Clone
+ DateTime::TimeZone
+ DateTime::Locale
+ YAML
+ DateTime
+ namespace::autoclean
+ IO::String
+ Algorithm::Diff
+ File::Slurp
+ Devel::StackTrace
+
+ XX-Modules-Which-Should-Not-Fail
+ IO
+ List::MoreUtils
+ Test::Harness
ExtUtils::MakeMaker
- File::Scan
- File::Spec
- File::Tail
+ File::Path
+ XML::Parser
+ Test::Simple
+ HTML::Tree
+ Storable
+ Net::IP
+ DB_File
+ XML::LibXML
+ Time::HiRes
+ Exporter
+ Pod::Escapes
+ ExtUtils::ParseXS
+ Module::Build
+ Pod::Parser
+ Data::Dumper
+ ExtUtils::Install
+ IO::Tty
+ XML::SAX
+ Class::ErrorHandler
+ URI
+ HTML::Template
+ Compress::Raw::Zlib
+ Net::DNS
+ Test::Pod::Coverage
+ XSLoader
+ version
+ URI::Fetch
+ Pod::Simple
+ constant
+ Test
File::Temp
- GD::Graph
- GD::Text
- Getopt::Long
- XXHTML::Mason XX_wants_to_install:mod_perl_1
- Image::Size
- IMAP::Admin
- Parse::RecDescent
- Inline
- IO
- Spiffy
- IO::All
- IO::Socket::SSL
- IO::String
- IO::Stringy
- XML::SAX2Perl
- Mail::Audit
- XXMail::ClamAV
- Mail::Sendmail
- Math::Pari
- MD5
- MIME::Lite
- MP3::Info
- Net::Daemon
- Net::FTP::Common
- Net::Ping
- Net::Server
- Net::SNMP
-
- XX_install_these_four_modules_in_order_before_Net::SSH::Perl
- XX_Net::SSH::Perl_requires_Crypt_DH
- XX_which_is_S_L_O_W_without_Math::BigInt::GMP
- Math::BigInt
- Math::BigRat
- bignum
- Math::BigInt::GMP
- XXNet::SSH::Perl
- XX_bah_the_whole_thing_is_broken___
-
- Net::Telnet
- OLE::Storage_Lite
+ XXTemplate::Toolkit
+ Cache::Cache
+ Feed::Find
+ HTML::Tagset
+ ExtUtils::PkgConfig
+ Devel::GlobalDestruction
+ PadWalker
+ Sub::Name
+ Encode
+ Test::Base
+ Class::DBI::Plugin::Type
+ Sub::Identify
+ Sub::Uplevel
Params::Validate
- XXImage::Magick
- RPC::PlServer
- Pod::Parser
POE
- XXSNMP
- SOAP::Lite
- Spreadsheet::ParseExcel
- Spreadsheet::WriteExcel
- Spreadsheet::WriteExcelXML
- Storable
- Template
- Term::ReadKey
- Term::ReadLine::Perl
- Text::Iconv
- Date::Parse
- Time::Timezone
- Unicode::String
- Unix::Syslog
- XXVerilog::Parser
+ Class::Singleton
+ Proc::ProcessTable
+ Compress::Raw::Bzip2
+ Class::MOP
+ HTTP::Server::Simple
+ Sub::Exporter
+ Fuse
+ File::HomeDir
+ Bot::BasicBot
+ XXURI::Find::Simple
+ base
+ XXGD
WWW::Mechanize
- XML::DOM
- XML::Generator
- XML::LibXML
- XML::NamespaceSupport
- XML::SAX
+ Test::Most
+ Sys::Syslog
+ File::Slurp
+ Tree::DAG_Node
+ FCGI
+ Params::Util
+ Devel::Peek
+ DateTime::Format::Mail
+ Spiffy
+ HTML::TableExtract
+ DBD::SQLite
+ Class::Accessor::Chained
+ DBIx::ContextualFetch
+ Test::Tester
+ Variable::Magic
+ AppConfig
+ Class::Accessor
+ Want
XML::Simple
- XML::Writer
- );
- # push @modules, "Apache::Request" if $apache !~ /apache/;
- push @modules, "Crypt::SSLeay" if -e "$Sw/bin/openssl";
- push @modules, "DBD::Oracle",
- "DBIx::Class::Schema::Loader::DBI::Oracle",
- if exists $ENV{ORACLE_HOME} && -d $ENV{ORACLE_HOME};
- # push @modules, "MQSeries" if $UBS;
- push @modules, "H/HB/HBIERSMA/MQSeries-1.28-b.tar.gz" if $UBS;
- push @modules, "SVN::Simple::Edit", "SVN::Mirror", "FreezeThaw", "SVK",
- "Exception::Class", "SVN::Web"
- if -e "$Sw/bin/svn";
-
- for (qw( XX/mnt/wesley/pjcj/g/perl/svk/dc
- XX/home/pjcj/g/perl/dc
- XX/bcy/pidjjq/dc
- /home/pjcj/g/work/Devel-Cover
- ))
- {
- push @modules, $_ if -e;
- }
-
- my $config =
- {
+ IO::All
+ Number::Format
+ Term::ReadKey
+ DBI
+ Test::Exception
+ );
- LWP => { test => sub {} },
- "Apache::Compress" => { test => sub {} },
- "Apache::Filter" => { test => sub {} },
- "Apache::Request" => { test => sub {} },
- "Apache::TEST" => { test => sub {} },
- "Data::Dump::Streamer" =>
- { config => sub { dsys "$Perl Makefile.PL DDS" } },
- "Crypt::SSLeay" =>
- {
- config => sub
- {
- # dsys qq($Perl -pi -e 's|(my \\\@POSSIBLE_SSL_DIRS = ).*|).
- # qq(\$1"$Sw";|' Makefile.PL);
- dsys "$Perl Makefile.PL --lib=$Sw/include"
- }
- },
- "SVN::Web" =>
- { config => sub { dsys "yes n | $Perl Makefile.PL" } },
- $UBS ?
- (
- "DBD::Oracle" =>
- { config => sub { dsys "$Perl Makefile.PL -m $ENV{ORACLE_HOME}".
- "/rdbms/lib/ins_rdbms.mk" } },
- ) : ()
- };
-
- my $cpandir = "http://cpan.wanadoo.nl/";
- for my $d (qw(
- /app/home/t136103/g/build/src/cpan
- /home/pidjjq/g/src/cpan
- /usr/local/pkg/cpan
- /home/pjcj/g/download/cpan ))
- {
- $cpandir = "file://$d/" if -d $d;
- }
- my $tar = $UBS ? "/app/home/t136103/g/sw/bin/gnutar" : "/bin/tar";
- my $f = "$Sw/.cpan";
- -d $f or mkdir $f, 0750 or die "Can't mkdir $f: $!";
- $f .= "/CPAN";
- -d $f or mkdir $f, 0750 or die "Can't mkdir $f: $!";
- $f .= "/MyConfig.pm";
- open my $fh, ">", $f or die "Can't open $f: $!";
- print $fh <<EOF;
-\$CPAN::Config = {
- 'build_cache' => q[100000],
- 'build_dir' => q[$Sw/.cpan/build],
- 'cache_metadata' => q[1],
- 'cpan_home' => q[$Sw/.cpan],
- 'dontload_hash' => { },
- 'ftp' => q[/usr/bin/ftp],
- 'ftp_proxy' => q[],
- 'getcwd' => q[cwd],
- 'gpg' => q[/usr/bin/gpg],
- 'gzip' => q[/bin/gzip],
- 'histfile' => q[$Sw/.cpan/histfile],
- 'histsize' => q[100],
- 'http_proxy' => q[],
- 'inactivity_timeout' => q[0],
- 'index_expire' => q[1],
- 'inhibit_startup_message' => q[0],
- 'keep_source_where' => q[$Sw/.cpan_sources],
- 'lynx' => q[/usr/bin/lynx],
- 'make' => q[/usr/bin/make],
- 'make_arg' => q[],
- 'make_install_arg' => q[],
- 'makepl_arg' => q[],
- 'ncftp' => q[],
- 'ncftpget' => q[],
- 'no_proxy' => q[],
- 'pager' => q[less],
- 'prerequisites_policy' => q[follow],
- 'scan_cache' => q[atstart],
- 'shell' => q[/bin/zsh],
- 'tar' => q[$tar],
- 'term_is_latin' => q[1],
- 'unzip' => q[/usr/bin/unzip],
- 'urllist' => [q[$cpandir]],
- 'wget' => q[/usr/bin/wget],
- 'auto_commit' => q[1],
- 'mbuildpl_arg' => q[],
- 'mbuild_arg' => q[],
- 'mbuild_install_build_command' => q[./Build],
- 'mbuild_install_arg' => q[],
-};
-print STDERR "Reading MyConfig!\\n";
-1;
-EOF
- close $fh or die "Can't close $f: $!";
-
- $ENV{APXS} = "$Sw/bin/apxs";
-
- eval "use CPAN";
-
- # dsys "echo upgrade | $Sw/bin/cpan";
- CPAN::Shell->upgrade("/./");
- # my $inst = sub { dsys "$Sw/bin/cpan install @_" };
- my $inst = sub { CPAN::Shell->install(@_) or
- CPAN::Shell->force("install", @_) };
-
- for my $m (@modules)
+ my $cpanm = "$Sw/bin/cpanm";
+ dsys((-e $cpanm ? $cpanm : "wget -O - http://cpanmin.us | $Perl -") .
+ " --self-upgrade\n");
+ for my $mod (@modules)
{
- if ($m =~ /^\//)
- {
- print "Installing $m\n";
- my $c =
- {
- %{$config->{$m} || {}},
- unpack => sub {},
- dir => sub { $m },
- test => sub {},
- };
- build $m, $m, $c;
- print "installed $m via Makefle.PL\n";
- }
- else
- {
- next if $m =~ /^XX/; # don't want these right now
- print "Installing $m\n";
- # for my $mod (CPAN::Shell->expand("Module", "/./")) { print $mod->id, "\n" }
- if (my $mod = CPAN::Shell->expandany($m))
- {
- # my $mod = CPAN::Shell->expand("Module", "/$m/") or die "Can't expand [$m]";
- print $mod->as_string;
- next if $mod->uptodate;
- # printf "Module %s is installed as %s and will be updated to %s from CPAN\n",
- # $mod->id, $mod->inst_version || "-", $mod->cpan_version;
-
- if ($config->{$m})
- {
- print "Installing $m version ", $mod->cpan_version, "\n";
- my $b = $mod->cpan_file;
- $b =~ s|.*/||;
- $b =~ s|\.tar.gz||;
- $b = "$Sw/.cpan/build/$b";
- sys "rm -rf $b-*";
- $mod->get;
- ($b) = glob "$b-*" unless -d $b;
- die "Can't find build dir $b" unless -d $b;
- print "Building in $b\n";
- my $c =
- {
- %{$config->{$m}},
- unpack => sub {},
- dir => sub { $b },
- $Blead ?
- (
- make => sub { sys "make" },
- install => sub { sys "make install" },
- ) : ()
- };
- build $m, $b, $c;
- }
- else
- {
- $inst->($m);
- }
- }
- else
- {
- warn "Can't expand [$m]";
- $inst->($m);
- }
- print "installed $m via CPAN\n";
- }
+ next if $mod =~ /^XX/;
+ dsys "$cpanm -v --force --mirror http://cpan.wanadoo.nl/ $mod\n"
+ if sys "$cpanm $mod\n";
}
}
+
if (building "coverage")
{
+ my $dir = "$Sw/.cpanm/work";
+
+ my $mods = "$Sw/modules";
+ mkdir $mods, 0750 unless -d $mods;
+ for my $d (grep -d, <$dir/*/*>)
+ {
+ print "Linking $d\n";
+ my ($e) = $d =~ m|/([^/]+)$| or die "Can't find module name";
+ my $new = "$mods/$e";
+ unlink $new if -e $new;
+ symlink $d => $new;
+ }
+
my $c;
- $c .= "/usr/local/pkg/base/sw/bin/perl $Sw/bin/" if $Blead;
- $c .= "cpancover -directory $Sw/.cpan/build -outputdir $Sw/cpancover ";
+ $c .= "perl5.12.2 $Sw/bin/" if $Blead;
+ $c .= "cpancover -directory $mods -outputdir $Sw/cpancover ";
$c .= "-outputfile index.html -report ";
$c .= $Blead ? "html" : "html_basic";
# $c .= " -force";
$c .= " -redo_html";
- dsys $c;
+ dsys "$c\n";
}
+
if (building "postgres" || building "dry")
{
my $pg = "$Installation/pgsql";
@@ -1019,15 +623,15 @@ Now run the following commands as root:
rm -rf $pg
mkdir -p $data
-chown -R postgres.postgres $pg
-su - postgres
+# chown -R postgres.postgres $pg
+# su - postgres
$Sw/bin/initdb -D $data
$Sw/bin/pg_ctl start -l $log -D $data
sleep 10
-$Sw/bin/createuser -P -e -s factr
-$Sw/bin/createdb -e -O factr factr
+$Sw/bin/createuser -P -e -s tsg
+$Sw/bin/createdb -e -O tsg tsg
-# $Sw/bin/psql factr
+# $Sw/bin/psql tsg
and stop the db with:
@@ -1044,6 +648,7 @@ $Perl = "$Sw/bin/perl";
$ENV{PATH} = "$Sw/bin:$ENV{PATH}";
$ENV{LD_LIBRARY_PATH} = "$Sw/lib:$ENV{LD_LIBRARY_PATH}";
$ENV{AUTOMATED_TESTING} = 1;
+$ENV{TEST_JOBS} = 7;
print "sw directory is $Sw\n";
print "perl is $Perl\n";
@@ -1057,18 +662,4 @@ main
__END__
-# cd /opt/bcy
-# chown -R t136103:ubsadmin sw
-$ cd $root/install
-$ perl ./buildperl ~/g/src perl-5.10.0 /opt/bcy
-# rm -rf sw/.cpan* sw/.subversion sw/bin/perl5.10.0
-# chown -R ubcy1001:gbcy1001 sw
-# chmod -R 755 sw
-$ cd /app/sw/wss/current
-$ mv base/sw sw.old
-$ cp -a /opt/bcy/sw base
-
-
-
-$ perl ./buildperl ~/g/perl/src blead /usr/local/pkg/factr perl modules apache mod_perl zlib openssl subversion
-$ perl ./buildperl ~/g/perl/src perl-5.8.8 /usr/local/pkg/factr-5.8.8 perl modules apache zlib openssl subversion
+$ perl5.12.2 ./buildperl ~/g/perl/src perl-5.12.2 /usr/local/pkg/tsg perl modules postgres