Package: libdpkg-parse-perl / 0.03-2

perl5.26.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Description: set entry to an empty string instead of undef
 in order to avoid "Use of uninitialized value $entry" warnings.
 Quoting perldelta for 5.26:
   Code like $x = $x . "a" was incorrectly failing to yield a use of
   uninitialized value warning when $x was a lexical variable with an
   undefined value. That has now been fixed. [perl #127877]
Origin: vendor
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2017-08-08
Forwarded: https://rt.cpan.org/Ticket/Display.html?id=122749
Bug: https://rt.cpan.org/Ticket/Display.html?id=122749

--- a/lib/DPKG/Parse.pm
+++ b/lib/DPKG/Parse.pm
@@ -111,7 +111,7 @@
         die "Cannot find " . $pkg->filename . ", or it's not a file at all!";
     }
     open(STATUS, $pkg->filename);
-    my $entry;
+    my $entry = '';
     my $line_num = -1;
     my $entry_line = 0;
     STATUSLINE: while (my $line = <STATUS>) {
@@ -120,7 +120,7 @@
             my $dpkg_entry = DPKG::Parse::Entry->new('data' => $entry, debug => $pkg->debug, line_num => $entry_line);
             push(@{$pkg->{'entryarray'}}, $dpkg_entry);
             $pkg->{'entryhash'}->{$dpkg_entry->package} = $dpkg_entry;
-            $entry = undef;
+            $entry = '';
             $entry_line = $line_num + 1;
             next STATUSLINE;
         }