Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

perl::critic::policy::valuesandexpressions::requirequotedheredoc(3) [centos man page]

Perl::Critic::Policy::ValuesAndExpressions::RequireQuoteUsereContribuPerl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator(3)

NAME
Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator - Write " print <<'THE_END' " or " print <<"THE_END" ". AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
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
This Policy is not configurable except for the standard options. SEE ALSO
Perl::Critic::Policy::ValuesAndExpressions::RequireUpperCaseHeredocTerminator AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> 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. perl v5.16.3 2Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator(3)

Check Out this Related Man Page

Perl::Critic::Policy::ValuesAndExpressions::ProhibitSpecUserPerl::Critic::Policy::ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator(3)

NAME
Perl::Critic::Policy::ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator - Don't write " print <<'__END__' ". AFFILIATION
This Policy is part of the core Perl::Critic distribution. 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__ CONFIGURATION
This Policy is not configurable except for the standard options. SEE ALSO
Perl::Critic::Policy::ValuesAndExpressions::RequireUpperCaseHeredocTerminator Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator AUTHOR
Kyle Hasselbacher <kyle@cpan.org> COPYRIGHT
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. perl v5.16.3 Perl::Critic::Policy::ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator(3)
Man Page

We Also Found This Discussion For You

1. Programming

[Perl] Different printf formating for different print options

Hi, Struggling with single quotes, double quotes, etc. I want to print a header line, followed by lines with actual values, based on a print option. In real life it is going to be something like 15 print options and 50 values. Output will be 1 header and several value lines. In this example... (5 Replies)
Discussion started by: ejdv
5 Replies