perl.req: Also skip blocks with my var = <<

Before only
var = <<BLOCK
 foo
BLOCK

was skipped.

But

my var = <<BLOCK

is also valid perl and needs to be skipped for dependency scanning.
This commit is contained in:
Florian Festi 2017-03-13 11:20:11 +01:00
parent 6f186deb95
commit 4a9b7f547c
1 changed files with 2 additions and 2 deletions

View File

@ -104,8 +104,8 @@ sub process_file {
# skip the "= <<" block
if (m/^\s*\$(?:.*)\s*=\s*<<\s*(["'`])(.+?)\1/ ||
m/^\s*\$(.*)\s*=\s*<<(\w+)\s*;/) {
if (m/^\s*(?:my\s*)?\$(?:.*)\s*=\s*<<\s*(["'`])(.+?)\1/ ||
m/^\s*(?:my\s*)?\$(.*)\s*=\s*<<(\w+)\s*;/) {
$tag = $2;
while (<FILE>) {
chomp;