Search results for "module:Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator"

Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator - Write print <<'THE_END' or print <<"THE_END" . River stage three • 131 direct dependents • 386 total dependents

Putting single or double-quotes around your HEREDOC terminator make it obvious to the reader whether the content is going to be interpolated or not. print <<END_MESSAGE; #not ok Hello World END_MESSAGE print <<'END_MESSAGE'; #ok Hello World END_MESSA...

PETDANCE/Perl-Critic-1.142 - 29 Nov 2022 02:20:23 UTC

Perl::Critic::Policy::ValuesAndExpressions::RequireUpperCaseHeredocTerminator - Write <<'THE_END'; instead of <<'theEnd'; . River stage three • 131 direct dependents • 386 total dependents

For legibility, HEREDOC terminators should be all UPPER CASE letters (and numbers), without any whitespace. Conway also recommends using a standard prefix like "END_" but this policy doesn't enforce that. print <<'the End'; #not ok Hello World the En...

PETDANCE/Perl-Critic-1.142 - 29 Nov 2022 02:20:23 UTC

Perl::Critic::Policy::ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator - Don't write print <<'__END__' . River stage three • 131 direct dependents • 386 total dependents

Using one of Perl's special literals as a HEREDOC terminator could be confusing to tools that try to parse perl. print <<'__END__'; #not ok Hello world __END__ print <<'__END_OF_WORLD__'; #ok Goodbye world! __END_OF_WORLD__ The special literals that ...

PETDANCE/Perl-Critic-1.142 - 29 Nov 2022 02:20:23 UTC
3 results (0.268 seconds)