You decided that my English is so poor that i can't read the docs of
Perl::Critic and understand why these warnings appeared? ;)
Your comment contains many errors :( Yes, if i modify my code according to your recommendations, Perl::Critic will stop complaining—but my code will stop working :)
Your recommendation to use
next if /^;/xms;
is very weird. The using of
/s and
/m switches together causes a very unexpected interpretation of the RegEx:
perlretut says:
both s and m modifiers (//sm): Treat string as a single long line, but detect multiple lines. '.' matches any character, even "\n". ^ and $, however, are able to match at the start or end of any line within the string.
Do you still think that it's a good idea to add /ms to the end of each regex?
Don't use local variables, use my. Don't the special variables like $", use the English module.
use English qw( -no_match_vars );
my $LIST_SEPERATOR = q{|};
- The Perl built-in variables lose their magic capabilities when declared as my. Didn't you know?
- There is no $LIST_SEPERATOR. Use $LIST_SEPARATOR instead.
- If you don't believe me, try the following code:
#!/usr/bin/perl
use warnings;
use strict;
use English qw( -no_match_vars );
{
local $LIST_SEPARATOR = q{!};
my @list = qw/this is my list/;
print "@list\n";
}
and then try to replace 'local' with 'my'.
BTW, Perl::Critic does not complain about local'ising in the code above ;)
s;;Just-me-not-h-Ni-m-P-Ni-lm-I-ar-O-Ni;;tr?IerONim-?HAcker ?d;print
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.