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::ProhibitSpecialLiteralHeredocTerminator - Don't write " print

Affiliation

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

Author

       Kyle Hasselbacher <kyle@cpan.org>

Configuration

       This Policy is not configurable except for the standard options.

Description

       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 this policy prohibits are:

       __END__
       __DATA__
       __PACKAGE__
       __FILE__
       __LINE__

Name

       Perl::Critic::Policy::ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator - Don't write " print
       <<'__END__' ".

See Also

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

       Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator

See Also