diff options
author | gregor herrmann <gregoa@debian.org> | 2024-04-19 16:44:56 +0200 |
---|---|---|
committer | gregor herrmann <gregoa@debian.org> | 2024-04-19 16:44:56 +0200 |
commit | dad6709ac126c3a47b15c79db21ce98eefc203d0 (patch) | |
tree | d1e6a9204d0cc802cadee064711408671741bbc5 | |
parent | 5aea1354c5a01d0aca775ff8ac6b2aa2d5967ce4 (diff) | |
parent | b4de226db927bd64f3063636e4b713e30234b272 (diff) |
Update upstream source from tag 'upstream/0.46'
Update to upstream version '0.46'
with Debian dir 0322e43cf796a5c5fb083afffc375c366322b7e0
-rw-r--r-- | Changes | 3 | ||||
-rw-r--r-- | META.json | 2 | ||||
-rw-r--r-- | META.yml | 2 | ||||
-rw-r--r-- | lib/Parse/PMFile.pm | 5 |
4 files changed, 9 insertions, 3 deletions
@@ -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 @@ -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" } @@ -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; |