Skip to content

Commit

Permalink
Tidy up version handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcj committed Jul 5, 2014
1 parent fd124f5 commit 5be8c55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions bin/cover
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use strict;
use warnings;

# VERSION
our $LVERSION = do { no warnings; eval '$VERSION' || "0.001" }; # for dev

use Devel::Cover::DB;

Expand Down Expand Up @@ -203,10 +204,9 @@ sub main {
push @{$Options->{annotations}}, $ann;
}

print "$0 version " . __PACKAGE__->VERSION . "\n" and exit 0
if $Options->{version};
pod2usage(-exitval => 0, -verbose => 1) if $Options->{help};
pod2usage(-exitval => 0, -verbose => 2) if $Options->{info};
print "$0 version $LVERSION\n" and exit 0 if $Options->{version};
pod2usage(-exitval => 0, -verbose => 1) if $Options->{help};
pod2usage(-exitval => 0, -verbose => 2) if $Options->{info};

my $dbname = File::Spec->rel2abs(@ARGV ? shift @ARGV : "cover_db");
die "Can't open database $dbname\n"
Expand Down
2 changes: 1 addition & 1 deletion lib/Devel/Cover.pm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use strict;
use warnings;

# VERSION
our $LVERSION = do { eval '$VERSION' || "0.001" }; # for development purposes
our $LVERSION = do { no warnings; eval '$VERSION' || "0.001" }; # for dev

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

0 comments on commit 5be8c55

Please sign in to comment.