Perl::...minator(3pm)

✨ NAME ✨

okay so bestie, this page is Perl::...minator(3pm) πŸ’– and it's all about the policy Perl::Critic::Policy::ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator β€” literally Don't write print <<'__END__'. periodt πŸ’…

🫢 AFFILIATION 🫢

This Policy is part of the core Perl::Critic distribution, so it's not some random side quest β€” it's in the main group chat ✨

πŸ”₯ DESCRIPTION πŸ”₯

Using one of Perl's special literals as a HEREDOC terminator could be confusing to tools that try to parse perl 😭 like bestie, the parser is doing its best, don't confuse it.

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__

So yeah, those exact iconics are not allowed as your HEREDOC terminator in this policy's eyes πŸ™ˆ no cap.

πŸŽ€ CONFIGURATION πŸŽ€

This Policy is not configurable except for the standard options. so no secret extra knobs here, bestie β€” just the standard options and that's it 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

  • Perl::Critic::Policy::ValuesAndExpressions::RequireUpperCaseHeredocTerminator
  • Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator

🌸 AUTHOR 🌸

Kyle Hasselbacher <kyle@cpan.org> πŸ’Œ

Copyright (c) 2009-2011 Kyle Hasselbacher.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module.


okay that's the whole page, bestie πŸ’– this little manual page is from perl v5.42.0, dated 2024-10-23, and it lives under the manual name Perl::...minator(3pm). bye bestie 🫢✨

πŸ“¦ where this page comes from