." />

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


Perl-Critic documentation  | view source Contained in the Perl-Critic distribution.

Index


NAME

Top

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

AFFILIATION

Top

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

DESCRIPTION

Top

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




CONFIGURATION

Top

This Policy is not configurable except for the standard options.

SEE ALSO

Top

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

AUTHOR

Top

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

COPYRIGHT

Top


Perl-Critic documentation  | view source Contained in the Perl-Critic distribution.