Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

perl::critic::policy::editor::requireemacsfilevariables(3) [centos man page]

Perl::Critic::Policy::Editor::RequireEmacsFileVariables(User Contributed Perl DocumentatPerl::Critic::Policy::Editor::RequireEmacsFileVariables(3)

NAME
Perl::Critic::Policy::Editor::RequireEmacsFileVariables - Per-file editor settings. AFFILIATION
This policy is part of Perl::Critic::More, a bleeding edge supplement to Perl::Critic. DESCRIPTION
Many text editors know how to find magic strings in files that indicate settings that work best for that file. For example, the file can indicate that it expects four-character indentation. In emacs, this magic string is called "File Variables". There are two syntaxes: "-*- ... -*-" (single-line) and "Local Variables: ... End:" (multi-line). Both syntaxes allow leading and trailing text on the line. The single-line syntax must be used on the first line of the file to be recognized, or on the second line if the first line is a shebang. The following examples are explicitly allowed by Perl: #!perl -w -*- cperl -*- #!perl -w # -*- cperl -*- #!perl # -*- cperl -*- The multi-line syntax must be used "in the last page" (that is, after the last formfeed) at the end of the file. As of Emacs21, the "end of the file" is hard-coded to be the last 3000 bytes of the file (in the hack-local-variables function in files.el). In this syntax, each line must begin and end with the same prefix/suffix pair. That pair is defined by the text before and after the "Local Variables:" string. SEE ALSO
Perl::Critic::Policy::Editor::RequireViModeline <http://www.gnu.org/software/emacs/manual/html_node/File-Variables.html> In Emacs, you can view the "File Variables" info node by typing: "Help-key", "i", "g", "(emacs)File Variables" (where "Help-key" is often "C-h" or "F1".) Alternatively, you can execute the following elisp: (info "(emacs)File Variables") AUTHOR
Chris Dolan <cdolan@cpan.org> Michael Wolf <MichaelRWolf@att.net> COPYRIGHT
Copyright (c) 2006-2008 Chris Dolan 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 2014-06-10 Perl::Critic::Policy::Editor::RequireEmacsFileVariables(3)

Check Out this Related Man Page

Perl::Critic::Policy::RegularExpressions::RequireBracesFUserlContributed PerPerl::Critic::Policy::RegularExpressions::RequireBracesForMultiline(3)

NAME
Perl::Critic::Policy::RegularExpressions::RequireBracesForMultiline - Use "{" and "}" to delimit multi-line regexps. AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Long regular expressions are hard to read. A good practice is to use the "x" modifier and break the regex into multiple lines with comments explaining the parts. But, with the usual "//" delimiters, the beginning and end can be hard to match, especially in a "s///" regexp. Instead, try using "{}" characters to delimit your expressions. Compare these: s/ <a s+ href="([^"]+)"> (.*?) </a> /link=$1, text=$2/xms; vs. s{ <a s+ href="([^"]+)"> (.*?) </a> } {link=$1, text=$2}xms; Is that an improvement? Marginally, but yes. The curly braces lead the eye better. CONFIGURATION
There is one option for this policy, "allow_all_brackets". If this is true, then, in addition to allowing "{}", the other matched pairs of "()", "[]", and "<>" are allowed. CREDITS
Initial development of this policy was supported by a grant from the Perl Foundation. AUTHOR
Chris Dolan <cdolan@cpan.org> 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 perl v5.16.3 2014-06-Perl::Critic::Policy::RegularExpressions::RequireBracesForMultiline(3)
Man Page