Perl provides several mechanisms for warning the user about potential problems with the program. The {{ Wiki Markup use
warnings
}} pragma turns on a default set of warnings for the Perl runtime to produce should it detect questionable code. The {{-w
}} command-line argument serves the same purpose. It is considered so useful that the {{perl(1)
}} manpage \ [[Wall 2011|AA. Bibliography#Manpages] \] dryly notes the first bug in Perl is that:
The -w switch is not mandatory.
...
Tool | Diagnostic |
---|---|
Perl::Critic | TestingAndDebugging::ProhibitNoStrict |
Perl::Critic | TestingAndDebugging:;ProhibitNoWarnings |
Perl::Critic | TestingAndDebugging::ProhibitProlongedStrictureOverride |
Perl::Critic | TestingAndDebugging::RequireUseStrict |
Bibliography
\[[Conway 05|AA. Bibliography#Conway 05]\] pg. 433
\ Wiki Markup
[[CPAN|AA. Bibliography#CPAN]\] [Elliot Shank, Perl-Critic-1.116|http://search.cpan.org/~elliotjs/Perl-Critic-1.116/] [TestingAndDebugging::ProhibitNoStrict|http://search.cpan.org/dist/Perl-Critic/lib/Perl/Critic/Policy/TestingAndDebugging/ProhibitNoStrict.pm],
[,
TestingAndDebugging::ProhibitNoWarnings|http://search.cpan.org/dist/Perl-Critic/lib/Perl/Critic/Policy/TestingAndDebugging/ProhibitNoWarnngs.pm],
[TestingAndDebugging::ProhibitProlongedStrictureOverride|http://search.cpan.org/dist/Perl-Critic/lib/Perl/Critic/Policy/TestingAndDebugging/ProhibitProlongedStrictureOverride.pm],
[TestingAndDebugging::RequireUseStrict|http://search.cpan.org/dist/Perl-Critic/lib/Perl/Critic/Policy/TestingAndDebugging/RequireUseStrict.pm]
\[[Wall 2011|AA. Bibliography#Manpages]\] [perl|http://perldoc.perl.org/perl.html] [strict|http://perldoc.perl.org/strict.html] [warnings|http://perldoc.perl.org/warnings.html],
TestingAndDebugging::ProhibitProlongedStrictureOverride,
TestingAndDebugging::RequireUseStrict
[Wall 2011] perl strict warnings
...
EXP30-PL. Do not use deprecated or obsolete functions 02. Expressions