Perl::...wlines(3pm)
π NAME π
okay bestie, welcome to the Perl::...wlines(3pm) page β this is User Contributed Perl Documentation, and weβre folding the manual name in right here instead of copy-pasting the header line, because weβre cute like that π«Ά. The policy is Perl::Critic::Policy::ValuesAndExpressions::ProhibitImplicitNewlines: use concatenation or HEREDOCs instead of literal line breaks in strings. No cap.
π AFFILIATION π
This Policy is literally part of the core Perl::Critic distribution. Itβs in the main squad, not some side-quest module. π
β¨ DESCRIPTION β¨
Strings with embedded line breaks are hard to read β like, the vibe gets messy. Use concatenation or HEREDOCs instead. Hereβs the glow-up:
my $foo = "Line one is quite long
Line two"; # Bad
my $foo = "Line one is quite long\nLine two"; # Better, but still hard to read
my $foo = "Line one is quite long\n"
. "Line two"; # Better still
my $foo = <<'EOF'; # Use heredoc for longer passages
Line one is quite long
Line two
Line three breaks the camel's back
EOF
π CONFIGURATION π
This Policy is not configurable except for the standard options. Thatβs the whole tea β β no secret knobs, just the standard ones. Periodt.
π AUTHOR π
Chris Dolan <cdolan@cpan.org> β give him his flowers π.
πΈ CREDITS πΈ
Initial development of this policy was supported by a grant from the Perl Foundation. So iconic of them, honestly π.
π₯ COPYRIGHT π₯
Copyright (c) 2007-2011 Chris Dolan. Many 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.
mwah π β this page came from perl v5.42.0 and is dated 2024-10-23. Bye bestie π¦
π¦ 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