chantra / rpms / rpm

Forked from rpms/rpm 2 years ago
Clone
5523e9
From 6a8754b2153e0e4305ef2bc5a789bfe02f65e889 Mon Sep 17 00:00:00 2001
5523e9
From: Florian Festi <ffesti@redhat.com>
5523e9
Date: Tue, 14 Jun 2016 15:01:16 +0200
5523e9
Subject: [PATCH] perl.req: Skip over multi line return statements See
5523e9
 Rhbz#1275551
5523e9
5523e9
---
5523e9
 scripts/perl.req | 5 +++--
5523e9
 1 file changed, 3 insertions(+), 2 deletions(-)
5523e9
5523e9
diff --git a/scripts/perl.req b/scripts/perl.req
5523e9
index f1000c8..7155518 100755
5523e9
--- a/scripts/perl.req
5523e9
+++ b/scripts/perl.req
5523e9
@@ -160,11 +160,12 @@ sub process_file {
5523e9
 
5523e9
     #
5523e9
     # The (require|use) match further down in this subroutine will match lines
5523e9
-    # within a multi-line print statement.  So, let's skip over such print
5523e9
+    # within a multi-line print or return statements.  So, let's skip over such
5523e9
     # statements whose content should not be loading modules anyway. -BEF-
5523e9
     #
5523e9
     if (m/print(?:\s+|\s+\S+\s+)\<\<\s*(["'`])(.+?)\1/ ||
5523e9
-        m/print(\s+|\s+\S+\s+)\<\<(\w+)/) {
5523e9
+        m/print(\s+|\s+\S+\s+)\<\<(\w+)/ ||
5523e9
+	m/return(\s+)\<\<(\w+)/ ) {
5523e9
 
5523e9
         my $tag = $2;
5523e9
         while (<FILE>) {
5523e9
-- 
5523e9
2.5.5
5523e9