summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgregor herrmann <gregoa@debian.org>2024-04-19 16:44:56 +0200
committergregor herrmann <gregoa@debian.org>2024-04-19 16:44:56 +0200
commitdad6709ac126c3a47b15c79db21ce98eefc203d0 (patch)
treed1e6a9204d0cc802cadee064711408671741bbc5
parent5aea1354c5a01d0aca775ff8ac6b2aa2d5967ce4 (diff)
parentb4de226db927bd64f3063636e4b713e30234b272 (diff)
Update upstream source from tag 'upstream/0.46'
Update to upstream version '0.46' with Debian dir 0322e43cf796a5c5fb083afffc375c366322b7e0
-rw-r--r--Changes3
-rw-r--r--META.json2
-rw-r--r--META.yml2
-rw-r--r--lib/Parse/PMFile.pm5
4 files changed, 9 insertions, 3 deletions
diff --git a/Changes b/Changes
index ee6f950..2cd92e6 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
Revision history for Parse-PMFile
+0.46 2024/04/15
+ - Strip BOM before finding a package
+
0.45 2024/01/21
- Make sure to stringify versions so that they are quoted when they are encoded in JSON
diff --git a/META.json b/META.json
index 2992182..909d062 100644
--- a/META.json
+++ b/META.json
@@ -52,6 +52,6 @@
"url" : "https://github.com/charsbar/Parse-PMFile"
}
},
- "version" : "0.45",
+ "version" : "0.46",
"x_serialization_backend" : "JSON::PP version 4.16"
}
diff --git a/META.yml b/META.yml
index e44c3e1..0ff1924 100644
--- a/META.yml
+++ b/META.yml
@@ -27,5 +27,5 @@ requires:
version: '0.83'
resources:
repository: https://github.com/charsbar/Parse-PMFile
-version: '0.45'
+version: '0.46'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff --git a/lib/Parse/PMFile.pm b/lib/Parse/PMFile.pm
index af4f705..00d31c3 100644
--- a/lib/Parse/PMFile.pm
+++ b/lib/Parse/PMFile.pm
@@ -10,7 +10,7 @@ use Dumpvalue;
use version ();
use File::Spec ();
-our $VERSION = '0.45';
+our $VERSION = '0.46';
our $VERBOSE = 0;
our $ALLOW_DEV_VERSION = 0;
our $FORK = 0;
@@ -358,9 +358,12 @@ sub _packages_per_pmfile {
local $/ = "\n";
my $inpod = 0;
+ my $checked_bom;
PLINE: while (<$fh>) {
chomp;
my($pline) = $_;
+ $pline =~ s/\A(?:\x00\x00\xfe\xff|\xff\xfe\x00\x00|\xfe\xff|\xff\xfe|\xef\xbb\xbf)// unless $checked_bom;
+ $checked_bom = 1;
$inpod = $pline =~ /^=(?!cut)/ ? 1 :
$pline =~ /^=cut/ ? 0 : $inpod;
next if $inpod;