logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator - Write " print <<'THE_END' "

Affiliation

       This Policy is part of the core Perl::Critic distribution.

Author

       Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>

Configuration

       This Policy is not configurable except for the standard options.

Description

       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_MESSAGE

           print <<"END_MESSAGE";  #ok
           $greeting
           END_MESSAGE

Name

       Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator - Write " print <<'THE_END' "
       or " print <<"THE_END" ".

See Also

       Perl::Critic::Policy::ValuesAndExpressions::RequireUpperCaseHeredocTerminator

See Also