Perl::...inator(3pm)
π NAME π
You're on the Perl::...inator(3pm) page, bestie, and this policy is literally Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator β it wants you to write print <<'THE_END' or print <<"THE_END". Periodt. π
β¨ AFFILIATION β¨
This Policy is part of the core Perl::Critic distribution. It's giving core-distribution main character energy. π
π¦ DESCRIPTION π¦
Okay so the whole vibe here: putting single or double quotes around your HEREDOC terminator makes it obvious to the reader whether the content is going to be interpolated or not. No cap, it's just clearer. πΈ
print <<END_MESSAGE; #not ok
Hello World
END_MESSAGE
print <<'END_MESSAGE'; #ok
Hello World
END_MESSAGE
print <<"END_MESSAGE"; #ok
$greeting
END_MESSAGE
Like, the first one is lowkey not the move (#not ok), and the quoted ones are slaying (#ok). β¨
π CONFIGURATION π
This Policy is not configurable except for the standard options. That's it, that's the whole tea. π
π SEE ALSO π
Perl::Critic::Policy::ValuesAndExpressions::RequireUpperCaseHeredocTerminatorβ the sibling policy you should also go check out, iykyk. π
π«Ά AUTHOR π«Ά
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> β iconic. π
π COPYRIGHT π
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved.
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 was perl v5.42.0 from 2024-10-23 on the Perl::...inator(3pm) page πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Perl-Critic 1.156.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms