Permalink
Browse files

Move to OurPkgVersion from PkgVersion.

  • Loading branch information...
1 parent a25b0dc commit 82affc56f8dffe62467ed742c172c7fb4c3a8f88 @pjcj committed Oct 12, 2011
Showing with 133 additions and 40 deletions.
  1. +2 −0 bin/cover
  2. +9 −5 bin/cpancover
  3. +3 −1 bin/gcov2perl
  4. +10 −2 dist.ini
  5. +9 −6 lib/Devel/Cover.pm
  6. +2 −0 lib/Devel/Cover/Annotation/Git.pm
  7. +2 −0 lib/Devel/Cover/Annotation/Random.pm
  8. +2 −0 lib/Devel/Cover/Annotation/Svk.pm
  9. +2 −0 lib/Devel/Cover/Branch.pm
  10. +2 −0 lib/Devel/Cover/Condition.pm
  11. +2 −0 lib/Devel/Cover/Condition_and_2.pm
  12. +2 −0 lib/Devel/Cover/Condition_and_3.pm
  13. +2 −0 lib/Devel/Cover/Condition_or_2.pm
  14. +2 −0 lib/Devel/Cover/Condition_or_3.pm
  15. +2 −0 lib/Devel/Cover/Condition_xor_4.pm
  16. +10 −8 lib/Devel/Cover/Criterion.pm
  17. +5 −3 lib/Devel/Cover/DB.pm
  18. +3 −1 lib/Devel/Cover/DB/Digests.pm
  19. +2 −0 lib/Devel/Cover/DB/File.pm
  20. +2 −0 lib/Devel/Cover/DB/IO.pm
  21. +2 −0 lib/Devel/Cover/DB/IO/JSON.pm
  22. +2 −0 lib/Devel/Cover/DB/IO/Storable.pm
  23. +2 −1 lib/Devel/Cover/DB/Structure.pm
  24. +2 −0 lib/Devel/Cover/Op.pm
  25. +2 −0 lib/Devel/Cover/Pod.pm
  26. +2 −0 lib/Devel/Cover/Report/Compilation.pm
  27. +2 −0 lib/Devel/Cover/Report/Html.pm
  28. +8 −4 lib/Devel/Cover/Report/Html_basic.pm
  29. +6 −4 lib/Devel/Cover/Report/Html_minimal.pm
  30. +8 −4 lib/Devel/Cover/Report/Html_subtle.pm
  31. +2 −0 lib/Devel/Cover/Report/Sort.pm
  32. +2 −0 lib/Devel/Cover/Report/Text.pm
  33. +2 −0 lib/Devel/Cover/Report/Text2.pm
  34. +2 −0 lib/Devel/Cover/Statement.pm
  35. +2 −0 lib/Devel/Cover/Subroutine.pm
  36. +2 −0 lib/Devel/Cover/Test.pm
  37. +2 −0 lib/Devel/Cover/Time.pm
  38. +1 −0 lib/Devel/Cover/Truth_Table.pm
  39. +1 −1 lib/Devel/Cover/Tutorial.pod
  40. +2 −0 lib/Devel/Cover/Web.pm
  41. +2 −0 utils/Devel/Cover/BuildUtils.pm
  42. +2 −0 utils/create_gold
View
@@ -12,6 +12,8 @@ require 5.6.1;
use strict;
use warnings;
+# VERSION
+
use Devel::Cover::DB;
use Config;
View
@@ -12,6 +12,8 @@ require 5.6.1;
use strict;
use warnings;
+# VERSION
+
use Devel::Cover::DB;
use Cwd ();
@@ -54,7 +56,7 @@ sub get_options
version|v!
));
- print "$0 version ".__PACKAGE__->VERSION."\n" and exit 0 if $Options->{version};
+ print "$0 version $VERSION\n" and exit 0 if $Options->{version};
pod2usage(-exitval => 0, -verbose => 0) if $Options->{help};
pod2usage(-exitval => 0, -verbose => 2) if $Options->{info};
@@ -354,6 +356,8 @@ package Devel::Cover::Cpancover::Template::Provider;
use strict;
use warnings;
+# VERSION
+
use base "Template::Provider";
my %Templates;
@@ -383,13 +387,13 @@ bgcolor="[% colours.$colour %]"
[%- END %]
EOT
-$Templates{html} =
-q{<!DOCTYPE html
+$Templates{html} = <<'EOT';
+<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"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 }.__PACKAGE__->VERSION.q{
+This file was generated by Devel::Cover Version 0.79
@wchristian

wchristian Oct 13, 2011

Contributor

I don't think this revert was intended as is, was it?

@pjcj

pjcj Oct 14, 2011

Owner

Fixed - thanks.

Devel::Cover is copyright 2001-2011, 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:
@@ -406,7 +410,7 @@ http://www.pjcj.net
[% content %]
</body>
</html>
-};
+EOT
$Templates{summary} = <<'EOT';
[% WRAPPER html %]
View
@@ -12,6 +12,8 @@ require 5.6.1;
use strict;
use warnings;
+# VERSION
+
use Devel::Cover::DB;
use File::Path;
@@ -36,7 +38,7 @@ sub get_options
merge!
version|v!
));
- print "$0 version ".__PACKAGE__->VERSION."\n" and exit 0 if $Options->{version};
+ print "$0 version $VERSION\n" and exit 0 if $Options->{version};
pod2usage(-exitval => 0, -verbose => 0) if $Options->{help};
pod2usage(-exitval => 0, -verbose => 2) if $Options->{info};
}
View
@@ -9,9 +9,9 @@ version = 0.79
[GatherDir] ; gathers files from the dist dir
include_dotfiles = 1
-[ManifestSkip] ; removes gathered files that match anything in MANIFEST.SKIP
+[ManifestSkip] ; removes gathered files specified by MANIFEST.SKIP
[ExecDir] ; marks bin as the dir to contain scripts
-[PkgVersion] ; adds versions to the packages
+[OurPkgVersion] ; adds versions to the packages
[PodVersion] ; adds versions to the POD of packages
[Manifest] ; builds the manifest from the gathered files
@@ -34,3 +34,11 @@ format = Release %v - %{d}dth %{MMMM yyyy}d
;[Readme ]
;[ShareDir ]
;[MakeMaker ]
+
+; [InsertCopyright]
+; [OurPkgVersion]
+; [EOLTests]
+; [FakeFaker]
+; [LocalBrew]
+; [Bugtracker]
+; [InstallGuide]
View
@@ -10,12 +10,15 @@ package Devel::Cover;
use strict;
use warnings;
+# VERSION
+our $LVERSION = do { eval '$VERSION'; "0.001" }; # for development purposes
+
use DynaLoader ();
our @ISA = "DynaLoader";
-use Devel::Cover::DB ;
+use Devel::Cover::DB;
use Devel::Cover::DB::Digests;
-use Devel::Cover::Inc ;
+use Devel::Cover::Inc;
use B qw( class ppname main_cv main_start main_root walksymtable OPf_KIDS );
use B::Debug;
@@ -112,7 +115,7 @@ BEGIN
qr/(?:reader|writer|constructor|destructor|accessor|predicate) /;
}
-sub version { __PACKAGE__->VERSION }
+sub version { $LVERSION }
if (0 && $Config{useithreads})
{
@@ -198,7 +201,7 @@ EOM
@coverage = get_coverage();
my $last = pop @coverage || "";
- print OUT __PACKAGE__, " ".__PACKAGE__->VERSION.": Collecting coverage data for ",
+ print OUT __PACKAGE__, " $LVERSION: Collecting coverage data for ",
join(", ", @coverage),
@coverage ? " and " : "",
"$last.\n",
@@ -313,10 +316,10 @@ sub import
@Ignore_re = map qr/$_/, @Ignore;
@Inc_re = map $ci ? qr/^\Q$_\//i : qr/^\Q$_\//, @Inc;
- if ($Devel::Cover::{VERSION})
+ if ($LVERSION > 0.002)
{
# Usual situation in production from a full release.
- bootstrap Devel::Cover ${$Devel::Cover::{VERSION}};
+ bootstrap Devel::Cover $LVERSION;
}
else
{
@@ -10,6 +10,8 @@ package Devel::Cover::Annotation::Git;
use strict;
use warnings;
+# VERSION
+
use Getopt::Long;
sub new
@@ -10,6 +10,8 @@ package Devel::Cover::Annotation::Random;
use strict;
use warnings;
+# VERSION
+
use Getopt::Long;
sub new
@@ -10,6 +10,8 @@ package Devel::Cover::Annotation::Svk;
use strict;
use warnings;
+# VERSION
+
use Getopt::Long;
use Digest::MD5;
@@ -10,6 +10,8 @@ package Devel::Cover::Branch;
use strict;
use warnings;
+# VERSION
+
use base "Devel::Cover::Criterion";
sub pad { my $self = shift; $self->[0] = [0, 0]
@@ -10,6 +10,8 @@ package Devel::Cover::Condition;
use strict;
use warnings;
+# VERSION
+
use base "Devel::Cover::Branch";
sub pad { $_[0][0][$_] ||= 0 for 0 .. $_[0]->count - 1 }
@@ -10,6 +10,8 @@ package Devel::Cover::Condition_and_2;
use strict;
use warnings;
+# VERSION
+
use base "Devel::Cover::Condition";
sub count { 2 }
@@ -10,6 +10,8 @@ package Devel::Cover::Condition_and_3;
use strict;
use warnings;
+# VERSION
+
use base "Devel::Cover::Condition";
sub count { 3 }
@@ -10,6 +10,8 @@ package Devel::Cover::Condition_or_2;
use strict;
use warnings;
+# VERSION
+
use base "Devel::Cover::Condition";
sub count { 2 }
@@ -10,6 +10,8 @@ package Devel::Cover::Condition_or_3;
use strict;
use warnings;
+# VERSION
+
use base "Devel::Cover::Condition";
sub count { 3 }
@@ -10,6 +10,8 @@ package Devel::Cover::Condition_xor_4;
use strict;
use warnings;
+# VERSION
+
use base "Devel::Cover::Condition";
sub count { 4 }
@@ -10,17 +10,19 @@ package Devel::Cover::Criterion;
use strict;
use warnings;
-use Devel::Cover::Statement ;
-use Devel::Cover::Branch ;
-use Devel::Cover::Condition ;
-use Devel::Cover::Condition_or_2 ;
-use Devel::Cover::Condition_or_3 ;
+# VERSION
+
+use Devel::Cover::Statement;
+use Devel::Cover::Branch;
+use Devel::Cover::Condition;
+use Devel::Cover::Condition_or_2;
+use Devel::Cover::Condition_or_3;
use Devel::Cover::Condition_and_2;
use Devel::Cover::Condition_and_3;
use Devel::Cover::Condition_xor_4;
-use Devel::Cover::Subroutine ;
-use Devel::Cover::Time ;
-use Devel::Cover::Pod ;
+use Devel::Cover::Subroutine;
+use Devel::Cover::Time;
+use Devel::Cover::Pod;
sub coverage { $_[0][0] }
sub information { $_[0][1] }
View
@@ -10,10 +10,12 @@ package Devel::Cover::DB;
use strict;
use warnings;
-use Devel::Cover::Criterion ;
-use Devel::Cover::DB::File ;
+# VERSION
+
+use Devel::Cover::Criterion;
+use Devel::Cover::DB::File;
use Devel::Cover::DB::Structure;
-use Devel::Cover::DB::IO ;
+use Devel::Cover::DB::IO;
use Carp;
use File::Path;
@@ -10,8 +10,10 @@ package Devel::Cover::DB::Digests;
use strict;
use warnings;
+# VERSION
+
use Devel::Cover::DB::Structure;
-use Devel::Cover::DB::IO ;
+use Devel::Cover::DB::IO;
my $File = "digests";
@@ -10,6 +10,8 @@ package Devel::Cover::DB::File;
use strict;
use warnings;
+# VERSION
+
use Devel::Cover::Criterion;
use Data::Dumper; $Data::Dumper::Indent = 1; $Data::Dumper::Sortkeys = 1;
View
@@ -10,6 +10,8 @@ package Devel::Cover::DB::IO;
use strict;
use warnings;
+# VERSION
+
my $Format;
BEGIN
@@ -13,6 +13,8 @@ use warnings;
use Fcntl ":flock";
use JSON::PP;
+# VERSION
+
sub new
{
my $class = shift;
@@ -12,6 +12,8 @@ use warnings;
use Storable;
+# VERSION
+
sub new
{
my $class = shift;
@@ -14,13 +14,14 @@ use Carp;
use Digest::MD5;
use Devel::Cover::DB;
-use Devel::Cover::DB::IO ;
+use Devel::Cover::DB::IO;
use Data::Dumper; $Data::Dumper::Indent = 1; $Data::Dumper::Sortkeys = 1;
# For comprehensive debug logging.
use constant DEBUG => 0;
+# VERSION
our $AUTOLOAD;
sub new
View
@@ -12,6 +12,8 @@ require 5.8.0; # My patches to B::Concise didn't get released till 5.8.0.
use strict;
use warnings;
+# VERSION
+
use Data::Dumper; $Data::Dumper::Indent = 1; $Data::Dumper::Sortkeys = 1;
use Devel::Cover qw( -ignore blib -ignore \\wB\\w );
View
@@ -10,6 +10,8 @@ package Devel::Cover::Pod;
use strict;
use warnings;
+# VERSION
+
use base "Devel::Cover::Criterion";
BEGIN { eval "use Pod::Coverage 0.06" } # We'll use this if it is available.
@@ -18,6 +18,8 @@ package Devel::Cover::Report::Compilation;
use strict;
use warnings;
+# VERSION
+
use Devel::Cover::DB;
# TODO - uncoverable code?
@@ -10,6 +10,8 @@ package Devel::Cover::Report::Html;
use strict;
use warnings;
+# VERSION
+
use base "Devel::Cover::Report::Html_minimal";
1;
Oops, something went wrong.

0 comments on commit 82affc5

Please sign in to comment.