summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Festi <ffesti@redhat.com>2016-06-14 15:01:16 +0200
committerFlorian Festi <ffesti@redhat.com>2016-06-14 15:01:16 +0200
commit6a8754b2153e0e4305ef2bc5a789bfe02f65e889 (patch)
tree0837eb326d0db1902129baeeed073ed9691c2886
parentd06ee682da45d0a727c77ca8ae7ad25378010639 (diff)
downloadrpm-6a8754b2153e0e4305ef2bc5a789bfe02f65e889.tar.gz
perl.req: Skip over multi line return statements
See Rhbz#1275551
-rwxr-xr-xscripts/perl.req5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/perl.req b/scripts/perl.req
index f1000c889..715551858 100755
--- a/scripts/perl.req
+++ b/scripts/perl.req
@@ -160,11 +160,12 @@ sub process_file {
#
# The (require|use) match further down in this subroutine will match lines
- # within a multi-line print statement. So, let's skip over such print
+ # within a multi-line print or return statements. So, let's skip over such
# statements whose content should not be loading modules anyway. -BEF-
#
if (m/print(?:\s+|\s+\S+\s+)\<\<\s*(["'`])(.+?)\1/ ||
- m/print(\s+|\s+\S+\s+)\<\<(\w+)/) {
+ m/print(\s+|\s+\S+\s+)\<\<(\w+)/ ||
+ m/return(\s+)\<\<(\w+)/ ) {
my $tag = $2;
while (<FILE>) {