File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ than it should be because it would skip an optimization. Now it's fixed.
1111Fixed test failures that would sometimes happen on Windows machines because
1212of taint mode. Thanks, Tomasz Konojacki. (GH #235)
1313
14+ Remove the use of the version.pm module.
15+
1416
1517v3.1.1 Sat Aug 31 22:56:10 CDT 2019
1618========================================
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ my %parms = (
1212 NAME => ' ack' ,
1313 AUTHOR => ' Andy Lester <andy@petdance.com>' ,
1414 ABSTRACT => ' A grep-like program for searching source code' ,
15- VERSION_FROM => ' lib/App/Ack.pm' ,
15+ VERSION => _version_from( ' lib/App/Ack.pm' ) ,
1616 LICENSE => ' artistic_2' ,
1717 MIN_PERL_VERSION => 5.010001,
1818 META_MERGE => {
@@ -55,6 +55,20 @@ my %parms = (
5555
5656WriteMakefile( %parms );
5757
58+ # VERSION_FROM in MakeMaker can't handle version objects.
59+ sub _version_from {
60+ my $file = shift ;
61+
62+ open ( my $fh , ' <' , $file ) or die " Can't open $file : $! " ;
63+ my ($line ) = grep { / ^\s *\$ VERSION\s +=/ } <$fh >;
64+ close $fh ;
65+
66+ die " Couldn't find a version line in $file " unless $line ;
67+ $line =~ / ^\s *\$ VERSION\s +=\s +(v3\.\d +\.\d +);/ or die " Can't parse VERSION on this line: $line " ;
68+
69+ return $1 ;
70+ }
71+
5872package MY ;
5973
6074# Suppress EU::MM test rule.
Original file line number Diff line number Diff line change 33use strict;
44use warnings;
55
6- use version;
7- our $VERSION = version-> declare( ' v3.1.1' ); # Check https://beyondgrep.com/ for updates
6+ our $VERSION = v3.1.1; # Check https://beyondgrep.com/ for updates
87
98use 5.010001;
109
Original file line number Diff line number Diff line change @@ -16,8 +16,7 @@ A container for functions for the ack program.
1616our $VERSION ;
1717our $COPYRIGHT ;
1818BEGIN {
19- use version;
20- $VERSION = version-> declare( ' v3.1.1' ); # Check https://beyondgrep.com/ for updates
19+ $VERSION = v3.1.1; # Check https://beyondgrep.com/ for updates
2120 $COPYRIGHT = ' Copyright 2005-2019 Andy Lester.' ;
2221}
2322our $STANDALONE = 0;
You can’t perform that action at this time.
0 commit comments