Subject: | False Positive - Heredoc terminator must be quoted |
The heredoc quoting test breaks if a space is present before the closing
identifier.
$ perlcritic -3 Tester.pm # Invocation
# Heredoc terminator must be quoted at line 7, column 18. See page 62
of PBP. (Severity: 3)
package Tester;
use strict;
use warnings;
sub broken_case {
my $template = << 'END_OF_TEMPLATE';
this is a multiline
here document
END_OF_TEMPLATE
return;
}
sub working_case {
my $template = <<'END_OF_TEMPLATE';
this is a multiline
here document
END_OF_TEMPLATE
return;
}
1;