michal-grzedzicki / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone
5523e9
From 4a9b7f547ce1bb6b0b352d2e29ae4b0d3bddebfb Mon Sep 17 00:00:00 2001
5523e9
From: Florian Festi <ffesti@redhat.com>
5523e9
Date: Mon, 13 Mar 2017 11:20:11 +0100
5523e9
Subject: [PATCH] perl.req: Also skip blocks with my var = <<
5523e9
5523e9
Before only
5523e9
var = <
5523e9
 foo
5523e9
BLOCK
5523e9
5523e9
was skipped.
5523e9
5523e9
But
5523e9
5523e9
my var = <
5523e9
5523e9
is also valid perl and needs to be skipped for dependency scanning.
5523e9
---
5523e9
 scripts/perl.req | 4 ++--
5523e9
 1 file changed, 2 insertions(+), 2 deletions(-)
5523e9
5523e9
diff --git a/scripts/perl.req b/scripts/perl.req
5523e9
index 7155518..52bd301 100755
5523e9
--- a/scripts/perl.req
5523e9
+++ b/scripts/perl.req
5523e9
@@ -104,8 +104,8 @@ sub process_file {
5523e9
 
5523e9
     # skip the "= <<" block
5523e9
 
5523e9
-    if (m/^\s*\$(?:.*)\s*=\s*<<\s*(["'`])(.+?)\1/ ||
5523e9
-        m/^\s*\$(.*)\s*=\s*<<(\w+)\s*;/) {
5523e9
+    if (m/^\s*(?:my\s*)?\$(?:.*)\s*=\s*<<\s*(["'`])(.+?)\1/ ||
5523e9
+        m/^\s*(?:my\s*)?\$(.*)\s*=\s*<<(\w+)\s*;/) {
5523e9
       $tag = $2;
5523e9
       while (<FILE>) {
5523e9
         chomp;
5523e9
-- 
5523e9
2.9.3
5523e9