Skip to content

Commit d797ca7

Browse files
committed
Versions
1 parent 219e571 commit d797ca7

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

cpanfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ requires "List::Util";
77

88
recommends "Data::Dumper" => "2.189";
99
recommends "Data::Peek" => "0.52";
10-
recommends "HTTP::Tiny" => "0.088";
11-
recommends "IO::Socket::SSL" => "2.085";
10+
recommends "HTTP::Tiny" => "0.090";
11+
recommends "IO::Socket::SSL" => "2.089";
12+
recommends "JSON::MaybeXS" => "1.004008";
1213

1314
on "configure" => sub {
1415
requires "ExtUtils::MakeMaker";
@@ -22,5 +23,5 @@ on "test" => sub {
2223
requires "Test::More" => "0.90";
2324
requires "Test::Warnings";
2425

25-
recommends "Test::More" => "1.302199";
26+
recommends "Test::More" => "1.302207";
2627
};

sandbox/genMETA.pl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@
6868
recommends:
6969
Data::Peek: 0.52
7070
Data::Dumper: 2.189
71-
HTTP::Tiny: 0.088
72-
IO::Socket::SSL: 2.085
71+
HTTP::Tiny: 0.090
72+
IO::Socket::SSL: 2.089
73+
JSON::MaybeXS: 1.004008
7374
test_recommends:
74-
Test::More: 1.302199
75+
Test::More: 1.302207
7576
configure_suggests:
7677
ExtUtils::MakeMaker: 7.70
7778
resources:

sandbox/genMETA.pm

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
package genMETA;
44

5-
our $VERSION = "1.15-20231007";
5+
our $VERSION = "1.16-20240903";
66

77
use 5.014001;
88
use warnings;
@@ -30,7 +30,9 @@ sub new {
3030

3131
sub extract_version {
3232
my $fh = shift;
33+
my @vsn;
3334
while (<$fh>) {
35+
m/\$VERSION\b/ and push @vsn => $_;
3436
m{^(?:our\s+)? # declaration
3537
\$VERSION \s*=\s* # variable
3638
["']? ([0-9._]+) # version
@@ -41,6 +43,15 @@ sub extract_version {
4143
$}x or next;
4244
return $1;
4345
}
46+
# No match on first scan, try without date
47+
for (@vsn) {
48+
m{^(?:our\s+)? # declaration
49+
\$VERSION \s*=\s* # variable
50+
([""'']) ([0-9._]+) \1 # version
51+
\s*;
52+
}x or next;
53+
return $2;
54+
}
4455
} # extract_version
4556

4657
sub version_from {

0 commit comments

Comments
 (0)