Skip to content

Commit

Permalink
import Devel::Cover 0.42
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcj committed Nov 3, 2004
1 parent 47484f9 commit 2585fae
Show file tree
Hide file tree
Showing 35 changed files with 147 additions and 107 deletions.
9 changes: 7 additions & 2 deletions CHANGES
Expand Up @@ -272,7 +272,12 @@ Release 0.41 - 29th April 2004
- Untaint @INC after using blib.
- Be silent if called via HARNESS_PERL_SWITCHES.
- Test against perl-5.8.4.
- Store cwd of when each modules was required in order to find them again.
- Store cwd from when each module was required in order to find them again.
- Refactor and tidy XS code.
- Get cpancover running again with the DB changes.
- Test for coverage collection against normalised filename.
- Normalise filenames.

Release 0.42 - 30th April 2004
- Add SYNOPSIS section to README.
- Resolve links for Devel::Cover::Inc (Dave Rolsky).
- Get things running on Windows again.
2 changes: 1 addition & 1 deletion META.yml
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Devel-Cover
version: 0.41
version: 0.42
version_from:
installdirs: site
requires:
Expand Down
14 changes: 9 additions & 5 deletions Makefile.PL
Expand Up @@ -19,8 +19,8 @@ use File::Copy;

$| = 1;

my $Version = "0.41";
my $Date = "29th April 2004";
my $Version = "0.42";
my $Date = "30th April 2004";
my $Author = 'pjcj@cpan.org';

my @perlbug = ("perlbug", "-a", $Author,
Expand All @@ -32,7 +32,7 @@ my @versions = grep { $_ ne "README" && $_ ne "Makefile.PL" } @files;

my $base = getcwd;

my %inc = map { $_ => 1 } @INC;
my %inc = map { ($_ eq "." ? $_ : Cwd::abs_path($_)) => 1 } @INC;
my @inc = sort keys %inc;

open I, ">lib/Devel/Cover/Inc.pm"
Expand Down Expand Up @@ -302,8 +302,9 @@ tags : @files
README : lib/Devel/Cover.pm
\t TERMCAP= COLUMNS=80 pod2text lib/Devel/Cover.pm | \\
\$(PERL) -n \\
-e 'print if (/NAME/ ... /^[A-Z ]+\$\$/) =~ /^\\d+\$\$/;' \\
-e 'print if (/DESCRIPTION/ ... /^[A-Z ]+\$\$/) =~ /^\\d+\$\$/;' \\
-e 'print if (/NAME/ ... /^[A-Z ]+\$\$/) =~ /^\\d+\$\$/;' \\
-e 'print if (/SYNOPSIS/ ... /^[A-Z ]+\$\$/) =~ /^\\d+\$\$/;' \\
-e 'print if (/DESCRIPTION/ ... /^[A-Z ]+\$\$/) =~ /^\\d+\$\$/;' \\
-e 'print if (/REQUIREMENTS/ ... /^[A-Z ]+\$\$/) =~ /^\\d+\$\$/;' \\
> README
Expand All @@ -326,6 +327,9 @@ run : _run
\t \$(PERL) -Mblib cover && \\
gvim -d \$(TEST).out
wrun : pure_all
\t \$(PERL) \$(TAINT) -Iblib/lib -Iblib/arch -MDevel::Cover=-ignore,blib,-merge,0 tests/\$(TEST)
DB = cover_db
dump :
Expand Down
16 changes: 16 additions & 0 deletions README
@@ -1,6 +1,22 @@
NAME
Devel::Cover - Code coverage metrics for Perl

SYNOPSIS
perl -MDevel::Cover yourprog args
cover

perl -MDevel::Cover=-db,cover_db,-coverage,statement,time yourprog args

To test an uninstalled module:

cover -delete
HARNESS_PERL_SWITCHES=-MDevel::Cover make test
cover

If the module does not use the t/*.t framework:

PERL5OPT=-MDevel::Cover make test

DESCRIPTION
This module provides code coverage metrics for Perl.

Expand Down
3 changes: 3 additions & 0 deletions all_versions
Expand Up @@ -50,6 +50,9 @@ my $command = "@ARGV" or die "Usage: $0 [-v version] command\n";
for my $v (@{$Options->{version}})
{
my $perl = "perl$v";
sys "rm -rf t";
sys "$perl Makefile.PL";
sys "make clean";
sys "$perl Makefile.PL";
sys "make";
sys $command;
Expand Down
6 changes: 3 additions & 3 deletions cover
Expand Up @@ -12,9 +12,9 @@ require 5.6.1;
use strict;
use warnings;

our $VERSION = "0.41";
our $VERSION = "0.42";

use Devel::Cover::DB 0.41;
use Devel::Cover::DB 0.42;

use Cwd "abs_path";
use Data::Dumper;
Expand Down Expand Up @@ -258,7 +258,7 @@ See the BUGS file.
=head1 VERSION
Version 0.41 - 29th April 2004
Version 0.42 - 30th April 2004
=head1 LICENCE
Expand Down
10 changes: 5 additions & 5 deletions cpancover
Expand Up @@ -12,9 +12,9 @@ require 5.6.1;
use strict;
use warnings;

our $VERSION = "0.41";
our $VERSION = "0.42";

use Devel::Cover::DB 0.41;
use Devel::Cover::DB 0.42;

use Cwd ();
use File::Find ();
Expand Down Expand Up @@ -309,7 +309,7 @@ package Devel::Cover::Cpancover::Template::Provider;
use strict;
use warnings;

our $VERSION = "0.41";
our $VERSION = "0.42";

use base "Template::Provider";

Expand Down Expand Up @@ -345,7 +345,7 @@ $Templates{html} = <<'EOT';
<!--
This file was generated by Devel::Cover Version 0.41
This file was generated by Devel::Cover Version 0.42
Devel::Cover is copyright 2001-2004, Paul Johnson (pjcj@cpan.org)
Expand Down Expand Up @@ -454,7 +454,7 @@ The following exit values are returned:
=head1 VERSION
Version 0.41 - 29th April 2004
Version 0.42 - 30th April 2004
=head1 LICENCE
Expand Down
4 changes: 2 additions & 2 deletions create_gold
Expand Up @@ -12,11 +12,11 @@ require 5.6.1;
use strict;
use warnings;

our $VERSION = "0.41";
our $VERSION = "0.42";

use blib;

use Devel::Cover::Test 0.41;
use Devel::Cover::Test 0.42;

my @tests = @ARGV;

Expand Down
6 changes: 3 additions & 3 deletions gcov2perl
Expand Up @@ -12,9 +12,9 @@ require 5.6.1;
use strict;
use warnings;

our $VERSION = "0.41";
our $VERSION = "0.42";

use Devel::Cover::DB 0.41;
use Devel::Cover::DB 0.42;

use Getopt::Long;
use Pod::Usage;
Expand Down Expand Up @@ -123,7 +123,7 @@ Huh?
=head1 VERSION
Version 0.41 - 29th April 2004
Version 0.42 - 30th April 2004
=head1 LICENCE
Expand Down
32 changes: 22 additions & 10 deletions lib/Devel/Cover.pm
Expand Up @@ -10,13 +10,13 @@ package Devel::Cover;
use strict;
use warnings;

our $VERSION = "0.41";
our $VERSION = "0.42";

use DynaLoader ();
our @ISA = "DynaLoader";

use Devel::Cover::DB 0.41;
use Devel::Cover::Inc 0.41;
use Devel::Cover::DB 0.42;
use Devel::Cover::Inc 0.42;

use B qw( class ppname main_cv main_start main_root walksymtable OPf_KIDS );
use B::Debug;
Expand Down Expand Up @@ -267,17 +267,29 @@ sub normalised_file
{
my $m = coverage(0)->{module}{$file};
# print STDERR "Loaded <$file> <$m->[0]> from <$m->[1]> ";
$file = File::Spec->rel2abs($file, coverage(0)->{module}{$file}[1]);
$file = File::Spec->rel2abs($file, $m->[1]);
# print STDERR "as <$file> ";
}
if ($] >= 5.008)
{
my $abs = abs_path($file);
# print STDERR "giving <$file> ";
$file = $abs if defined $abs;
# print STDERR "finally <$file>\n";
if ($^O eq "MSWin32")
{
# TODO - Windows seems busted here
}
else
{
# print STDERR "getting abs_path <$file> ";
my $abs = abs_path($file);
# print STDERR "giving <$file> ";
$file = $abs if defined $abs;
}
# print STDERR "finally <$file> <$Dir>\n";
}
if ($^O eq "MSWin32")
{
$file =~ s|\\|/|g;
}
$file =~ s/^$Dir\///;
$file =~ s|^$Dir/||;
$File_cache{$f} = $file;

# warn "File: $file => $File\n";
Expand Down Expand Up @@ -1064,7 +1076,7 @@ See the BUGS file. And the TODO file.
=head1 VERSION
Version 0.41 - 29th April 2004
Version 0.42 - 30th April 2004
=head1 LICENCE
Expand Down
4 changes: 2 additions & 2 deletions lib/Devel/Cover/Branch.pm
Expand Up @@ -10,7 +10,7 @@ package Devel::Cover::Branch;
use strict;
use warnings;

our $VERSION = "0.41";
our $VERSION = "0.42";

use base "Devel::Cover::Criterion";

Expand Down Expand Up @@ -76,7 +76,7 @@ Huh?
=head1 VERSION
Version 0.41 - 29th April 2004
Version 0.42 - 30th April 2004
=head1 LICENCE
Expand Down
4 changes: 2 additions & 2 deletions lib/Devel/Cover/Condition.pm
Expand Up @@ -10,7 +10,7 @@ package Devel::Cover::Condition;
use strict;
use warnings;

our $VERSION = "0.41";
our $VERSION = "0.42";

use base "Devel::Cover::Criterion";

Expand Down Expand Up @@ -80,7 +80,7 @@ Huh?
=head1 VERSION
Version 0.41 - 29th April 2004
Version 0.42 - 30th April 2004
=head1 LICENCE
Expand Down
4 changes: 2 additions & 2 deletions lib/Devel/Cover/Condition_and_3.pm
Expand Up @@ -10,7 +10,7 @@ package Devel::Cover::Condition_and_3;
use strict;
use warnings;

our $VERSION = "0.41";
our $VERSION = "0.42";

use base "Devel::Cover::Condition";

Expand Down Expand Up @@ -46,7 +46,7 @@ Huh?
=head1 VERSION
Version 0.41 - 29th April 2004
Version 0.42 - 30th April 2004
=head1 LICENCE
Expand Down
4 changes: 2 additions & 2 deletions lib/Devel/Cover/Condition_or_2.pm
Expand Up @@ -10,7 +10,7 @@ package Devel::Cover::Condition_or_2;
use strict;
use warnings;

our $VERSION = "0.41";
our $VERSION = "0.42";

use base "Devel::Cover::Condition";

Expand Down Expand Up @@ -46,7 +46,7 @@ Huh?
=head1 VERSION
Version 0.41 - 29th April 2004
Version 0.42 - 30th April 2004
=head1 LICENCE
Expand Down
4 changes: 2 additions & 2 deletions lib/Devel/Cover/Condition_or_3.pm
Expand Up @@ -10,7 +10,7 @@ package Devel::Cover::Condition_or_3;
use strict;
use warnings;

our $VERSION = "0.41";
our $VERSION = "0.42";

use base "Devel::Cover::Condition";

Expand Down Expand Up @@ -46,7 +46,7 @@ Huh?
=head1 VERSION
Version 0.41 - 29th April 2004
Version 0.42 - 30th April 2004
=head1 LICENCE
Expand Down
4 changes: 2 additions & 2 deletions lib/Devel/Cover/Condition_xor_4.pm
Expand Up @@ -10,7 +10,7 @@ package Devel::Cover::Condition_xor_4;
use strict;
use warnings;

our $VERSION = "0.41";
our $VERSION = "0.42";

use base "Devel::Cover::Condition";

Expand Down Expand Up @@ -45,7 +45,7 @@ Huh?
=head1 VERSION
Version 0.41 - 29th April 2004
Version 0.42 - 30th April 2004
=head1 LICENCE
Expand Down

0 comments on commit 2585fae

Please sign in to comment.