Re: findbugs for Perl?




"Jim Gibson" <jgibson@xxxxxxxxxxxxxxxxx> wrote in message news:030320061701529415%jgibson@xxxxxxxxxxxxxxxxxxxx
: In article <1141432071.876085.69000@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
: yusufm <yusufm@xxxxxxxxx> wrote:
:
: > Is there a good package like findbugs for perl code?
:
: There are two. Their names are 'strict' and 'warnings'. If you put the
: following two lines at the beginning of your Perl program, they will
: point out potential bugs in your code:
:
: use strict;
: use warnings;

You can also compile the code with

perl -c -w program

I have a compile script that determines the type of file
(usually by reading the shebang) and calls the appropriate
script compile option - perl's as above and

ksh -n file

and

ksh93 -n file

for ksh and ksh93. The script is called by hitting F4
in vim. Sure saves a lot of debug time.

Dan Mercer

:
: Posted Via Usenet.com Premium Usenet Newsgroup Services
: ----------------------------------------------------------
: ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
: ----------------------------------------------------------
: http://www.usenet.com


.



Relevant Pages

  • Re: tricky list comparison problem
    ... > I'm having a bit of an issue with a script I'm working on. ... > - 69078878" as available sectors. ... > use strict(); ... You are telling perl to load the 'strict' module and then you are telling the ...
    (perl.beginners)
  • Re: Trying to compile MP3::Info gives errors
    ... I try to compile a perl script into a win32 executable using the PAR packager. ... I thought it would compile my script in a win32 exe, but it actually just wraps the script in a bundle and you still need a perl interpreter on the machine to execute it. ... So p2e.pl is part of that App::Packer and has nothing to do with pp from PAR. ...
    (comp.lang.perl.modules)
  • Re: Reading STDIN seems to be breaking my script
    ... CGI Perl script. ... As soon as the code is executed, the rest of the script doesn't ... It wouldn't run under strict. ... The commented-out code would very probably not work as intended ...
    (comp.lang.perl.misc)
  • Re: sort stdin and print
    ... The script gets ip's. ... > I would like to sort it and and eliminate duplicates count the ... > in perl. ... > use strict; ...
    (perl.beginners)
  • Re: Please explain following script for me. Thanks in advance.
    ... Please quote some context of the posting you're answering ... But you don't program in Perl -- you just want to use ... You simply post your whole script here -- just saying that it doesn't ... Could you explain why there is a #-sign in front of "use strict"? ...
    (comp.lang.perl.misc)