Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Perl script validator

by Anonymous Monk
on Dec 18, 2004 at 18:42 UTC ( [id://415885]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Is there a perl(cgi) scripts validator(like W3C html validator), which test cgi script syntax validity, also provide some cleaning and optimizing features? My script works normally, and I have no any objections against it, but I just would like test syntax, slightly optimize it, probably clean from casual crossings out.

Replies are listed 'Best First'.
Re: Perl script validator
by castaway (Parson) on Dec 18, 2004 at 18:48 UTC
Re: Perl script validator
by gaal (Parson) on Dec 18, 2004 at 18:48 UTC
    perl -c + perltidy?
Re: Perl script validator
by atcroft (Abbot) on Dec 18, 2004 at 18:52 UTC

    For just checking if the syntax is clean, you could try perl -c filename. For cleaning up the code format-wise, you might want to look at PerlTidy. Hope that helps....

      My host does not support PerlTidy.
Re: Perl script validator
by thor (Priest) on Dec 19, 2004 at 17:03 UTC
    While I wholeheartedly agree with the 'perl -c' statements above, they are not a panacea. Because you can have run-time generated subroutines, perl -c doesn't bother to check whether or not the ones you called are valid or not. You'll find that out at runtime though...:).

    thor

    Feel the white light, the light within
    Be your own disciple, fan the sparks of will
    For all of us waiting, your kingdom will come

Re: Perl script validator
by uksza (Canon) on Dec 19, 2004 at 23:00 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://415885]
Approved by atcroft
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-20 02:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found