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