chantra / rpms / rpm

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