perl.req: Skip over multi line return statements

See Rhbz#1275551
This commit is contained in:
Florian Festi 2016-06-14 15:01:16 +02:00
parent d06ee682da
commit 6a8754b215
1 changed files with 3 additions and 2 deletions

View File

@ -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>) {