Permalink
Browse files

import Devel::Cover 0.22

  • Loading branch information...
1 parent 7a80026 commit e69ccba4aa7adac650b30e41b6a11cef719d76ea @pjcj committed Nov 3, 2004
View
@@ -129,3 +129,8 @@ Release 0.21 - 1st September 2003
- Don't collect branch coverage when not asked for.
- Provide golden results for different Perl versions.
- Change some B::Deparse logic to mirror changes in 5.8.1/5.10.
+
+Release 0.22 - 2nd September 2003
+ - Rewrite runops function
+ - First line of DESTROY blocks and overload subs not now skipped
+ - Add some more tests
View
@@ -451,7 +451,7 @@ static int runops_cover(pTHX)
SV **count;
IV c;
char *ch;
- HV *Files;
+ HV *Files = 0;
int collecting_here = 1;
char *lastfile = 0;
@@ -494,37 +494,14 @@ static int runops_cover(pTHX)
{
NDEB(D(L, "running func %p\n", PL_op->op_ppaddr));
-#if CAN_PROFILE
- /* Profile the first op */
-
- if (!Profiling_op)
- switch (PL_op->op_type)
- {
- case OP_SETSTATE:
- case OP_NEXTSTATE:
- case OP_DBSTATE:
- Profiling_op = PL_op;
- }
-#endif
-
- if (!(PL_op = CALL_FPTR(PL_op->op_ppaddr)(aTHX)))
- {
-#if CAN_PROFILE
- cover_time();
-#endif
- break;
- }
-
if (Got_condition)
{
Got_condition = 0;
- continue;
+ goto call_fptr;
}
- PERL_ASYNC_CHECK();
-
if (!Covering)
- continue;
+ goto call_fptr;
/* Check to see whether we are interested in this file */
@@ -533,7 +510,8 @@ static int runops_cover(pTHX)
char *file = CopFILE(cCOP);
if (file && (!lastfile || lastfile && strNE(lastfile, file)))
{
- Files = get_hv("Devel::Cover::Files", FALSE);
+ if (!Files)
+ Files = get_hv("Devel::Cover::Files", FALSE);
if (Files)
{
SV **f = hv_fetch(Files, file, strlen(file), 0);
@@ -550,7 +528,7 @@ static int runops_cover(pTHX)
cover_time();
Profiling_op = 0;
#endif
- continue;
+ goto call_fptr;
}
/*
@@ -567,14 +545,12 @@ static int runops_cover(pTHX)
#if CAN_PROFILE
cover_time();
#endif
-
if (collecting(Statement))
{
ch = get_key(PL_op);
count = hv_fetch(Statements, ch, ch_sz, 1);
c = SvTRUE(*count) ? SvIV(*count) + 1 : 1;
sv_setiv(*count, c);
-
NDEB(op_dump(PL_op));
}
break;
@@ -599,6 +575,17 @@ static int runops_cover(pTHX)
default:
; /* IBM's xlC compiler on AIX is very picky */
}
+
+ call_fptr:
+ if (!(PL_op = CALL_FPTR(PL_op->op_ppaddr)(aTHX)))
+ {
+#if CAN_PROFILE
+ cover_time();
+#endif
+ break;
+ }
+
+ PERL_ASYNC_CHECK();
}
TAINT_NOT;
View
@@ -43,6 +43,9 @@ tests/cond_xor
tests/cond_branch
tests/special_blocks
tests/statement
+tests/pod
+tests/destroy
+tests/overloaded
tests/Module1.pm
tests/Module2.pm
tests/Module_import.pm
@@ -60,6 +63,8 @@ test_output/cover/cond_branch.5.006001
test_output/cover/special_blocks.5.006001
test_output/cover/statement.5.006001
test_output/cover/pod.5.006001
+test_output/cover/destroy.5.006001
+test_output/cover/overloaded.5.006001
test_output/cover/t0.5.008
test_output/cover/t1.5.008
test_output/cover/t2.5.008
@@ -74,6 +79,8 @@ test_output/cover/cond_branch.5.008
test_output/cover/special_blocks.5.008
test_output/cover/statement.5.008
test_output/cover/pod.5.008
+test_output/cover/destroy.5.008
+test_output/cover/overloaded.5.008
test_output/cover/t0.5.008001
test_output/cover/t1.5.008001
test_output/cover/t2.5.008001
@@ -88,6 +95,8 @@ test_output/cover/cond_branch.5.008001
test_output/cover/special_blocks.5.008001
test_output/cover/statement.5.008001
test_output/cover/pod.5.008001
+test_output/cover/destroy.5.008001
+test_output/cover/overloaded.5.008001
lib/Devel/Cover/Tutorial.pod
session.vim
META.yml Module meta-data (added by MakeMaker)
View
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Devel-Cover
-version: 0.21
+version: 0.22
version_from:
installdirs: site
requires:
View
@@ -19,25 +19,23 @@ use ExtUtils::Manifest "maniread";
$| = 1;
-my $Version = "0.21";
-my $Date = "1st September 2003";
-my $Author = 'pjcj@cpan.org';
+my $Version = "0.22";
+my $Date = "2nd September 2003";
+my $Author = 'pjcj@cpan.org';
-my @perlbug = ("perlbug", "-a", $Author,
- "-s", "Installation of Devel::Cover $Version");
+my @perlbug = ("perlbug", "-a", $Author,
+ "-s", "Installation of Devel::Cover $Version");
+my $Perlbug = join " ", map { / / ? "'$_'" : $_ } @perlbug;
-my $Perlbug = join " ", map { / / ? "'$_'" : $_ } @perlbug;
-
-
-my @files = sort keys %{maniread()}, "lib/Devel/Cover/Inc.pm";
-my @versions = grep { $_ ne "README" && $_ ne "Makefile.PL" } @files;
+my @files = sort keys %{maniread()}, "lib/Devel/Cover/Inc.pm";
+my @versions = grep { $_ ne "README" && $_ ne "Makefile.PL" } @files;
my $test_version = $ENV{__COVER_GOLDEN_VERSION} || $];
-my $base = getcwd;
+my $base = getcwd;
-my %inc = map { $_ => 1 } @INC;
-my @inc = sort keys %inc;
+my %inc = map { $_ => 1 } @INC;
+my @inc = sort keys %inc;
open I, ">lib/Devel/Cover/Inc.pm"
or die "Cannot open lib/Devel/Cover/Inc.pm: $!";
View
1 TODO
@@ -1,5 +1,4 @@
- Indicate how to increase coverage?
-- Make the cpancover HTML output nicer.
- Collect data for path coverage.
- Tests.
- Documentation.
View
6 cover
@@ -12,9 +12,9 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.21";
+our $VERSION = "0.22";
-use Devel::Cover::DB 0.21;
+use Devel::Cover::DB 0.22;
use Getopt::Long;
@@ -201,7 +201,7 @@ See the BUGS file.
=head1 VERSION
-Version 0.21 - 1st September 2003
+Version 0.22 - 2nd September 2003
=head1 LICENCE
View
@@ -12,9 +12,9 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.21";
+our $VERSION = "0.22";
-use Devel::Cover::DB 0.21;
+use Devel::Cover::DB 0.22;
use Cwd ();
use File::Find ();
@@ -310,7 +310,7 @@ package Devel::Cover::Cpancover::Template::Provider;
use strict;
use warnings;
-our $VERSION = "0.21";
+our $VERSION = "0.22";
use base "Template::Provider";
@@ -346,7 +346,7 @@ $Templates{html} = <<'EOT';
<!--
-This file was generated by Devel::Cover Version 0.21
+This file was generated by Devel::Cover Version 0.22
Devel::Cover is copyright 2001-2003, Paul Johnson (pjcj@cpan.org)
@@ -454,7 +454,7 @@ The following exit values are returned:
=head1 VERSION
-Version 0.21 - 1st September 2003
+Version 0.22 - 2nd September 2003
=head1 LICENCE
View
@@ -12,11 +12,11 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.21";
+our $VERSION = "0.22";
use blib;
-use Devel::Cover::Test 0.21;
+use Devel::Cover::Test 0.22;
my @tests = @ARGV;
View
@@ -12,9 +12,9 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.21";
+our $VERSION = "0.22";
-use Devel::Cover::DB 0.21;
+use Devel::Cover::DB 0.22;
use Getopt::Long;
use Pod::Usage;
@@ -128,7 +128,7 @@ Huh?
=head1 VERSION
-Version 0.21 - 1st September 2003
+Version 0.22 - 2nd September 2003
=head1 LICENCE
View
@@ -11,12 +11,12 @@ use strict;
use warnings;
our @ISA = qw( DynaLoader );
-our $VERSION = "0.21";
+our $VERSION = "0.22";
use DynaLoader ();
-use Devel::Cover::DB 0.21;
-use Devel::Cover::Inc 0.21;
+use Devel::Cover::DB 0.22;
+use Devel::Cover::Inc 0.22;
use B qw( class ppname main_cv main_start main_root walksymtable OPf_KIDS );
use B::Debug;
@@ -708,7 +708,7 @@ See the BUGS file.
=head1 VERSION
-Version 0.21 - 1st September 2003
+Version 0.22 - 2nd September 2003
=head1 LICENCE
@@ -10,7 +10,7 @@ package Devel::Cover::Branch;
use strict;
use warnings;
-our $VERSION = "0.21";
+our $VERSION = "0.22";
use base "Devel::Cover::Criterion";
@@ -76,7 +76,7 @@ Huh?
=head1 VERSION
-Version 0.21 - 1st September 2003
+Version 0.22 - 2nd September 2003
=head1 LICENCE
@@ -10,7 +10,7 @@ package Devel::Cover::Condition;
use strict;
use warnings;
-our $VERSION = "0.21";
+our $VERSION = "0.22";
use base "Devel::Cover::Criterion";
@@ -80,7 +80,7 @@ Huh?
=head1 VERSION
-Version 0.21 - 1st September 2003
+Version 0.22 - 2nd September 2003
=head1 LICENCE
@@ -10,7 +10,7 @@ package Devel::Cover::Condition_and_3;
use strict;
use warnings;
-our $VERSION = "0.21";
+our $VERSION = "0.22";
use base "Devel::Cover::Condition";
@@ -46,7 +46,7 @@ Huh?
=head1 VERSION
-Version 0.21 - 1st September 2003
+Version 0.22 - 2nd September 2003
=head1 LICENCE
@@ -10,7 +10,7 @@ package Devel::Cover::Condition_or_2;
use strict;
use warnings;
-our $VERSION = "0.21";
+our $VERSION = "0.22";
use base "Devel::Cover::Condition";
@@ -46,7 +46,7 @@ Huh?
=head1 VERSION
-Version 0.21 - 1st September 2003
+Version 0.22 - 2nd September 2003
=head1 LICENCE
Oops, something went wrong.

0 comments on commit e69ccba

Please sign in to comment.