Subject: | several errors (false-negative results) |
Date: | Fri, 09 Jan 2009 19:13:06 +0500 |
To: | bug-Perl-Critic [...] rt.cpan.org |
From: | Alexander Krasnorutsky <krasnoroot [...] mail.ru> |
Hello!
Thanks for a very useful and powerful tool with a lot of excellent
features. But, unfortunately, there are some bugs (?) (at least they
seems to be errors).
1. false-negative - Variables::RequireLocalizedPunctuationVars with `@a'
2. false-negative - Subroutines::ProhibitNestedSubs and `BEGIN { sub
t{ } }'
3. false-negative - Subroutines::ProhibitAmpersandSigils with `defined
&func'
4. false-negative - CodeLayout::ProhibitParensWithBuiltins and
`Tk::exit(1)'
5. InputOutput::RequireCheckedSyscalls - why checks `close' (even if the
handle is really a socket) but not `shutdown' ? Should this policy be
applied only when the severity level is 1 (the most strict) ? I think
that it is more important (IMHO).
6. ErrorHandling::RequireCheckingReturnValueOfEval - the bug really is
in object destructor which should localise global variable $@ before
implicitly using it (encapsulation ...) but not in code which checks $@,
is not it ?
7. InputOutput::ProhibitExplicitStdin - of course, `<>' is a convenient
thing but without some additional checks it is insecure! Something like
`|rm -rf /' in arguments will cause a disaster (but user could want just
to open a file with such a `magic' name). And it is not very good to mix
I/O and handling of command line arguments.
8. RegularExpressions::RequireExtendedFormatting - is it really needed
for very short patterns ?
Excuse me for this critique(!) of the PBP (but it is inspired by the
name of this module ...).
$VERSION = 1.094001; perl 5.8.6; PPI-1.203
Best regards
--
Alexander Krasnorutsky.