alexk / rpms / rpm

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