Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
We don't bite newbies here... much
 
PerlMonks  

Re^2: Is it time for 'use stricter'?

by xdg (Monsignor)
on Aug 25, 2005 at 10:36 UTC ( #486500=note: print w/ replies, xml ) Need Help??


in reply to Re: Is it time for 'use stricter'?
in thread Is it time for 'use stricter'?

Yup -- that's the way to do it, I think. I wrote "source filter" in the original partly as it was the thing that occurred to me when the joke first came to me and partly to hint that I wasn't being serious. As people started saying "I wish that existed," I realized that to actually do it would need B (or, as diotalevi said, B::Lint) or PPI. And it should really be an external check -- or something easily turned off or commented out for production. You don't really want your CGI script to take 10 seconds to fire up because it's busy checking to see if you wrote q{} instead of ''.

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.


Comment on Re^2: Is it time for 'use stricter'?
Select or Download Code
Re^3: Is it time for 'use stricter'?
by jthalhammer (Friar) on Jan 13, 2006 at 07:02 UTC
    Perl-Critic does exactly that. It's an extensible static source code analyzer based on PPI. It enforces about 60 of Damian's Best Practices, plus a few others. The current interfaces are the  perlcritic command-line and Test-Perl-Critic which runs via test a script. But I could easily see hooking into a source filter that analyzed the code at compile-time.

    -Jeff

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://486500]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2014-04-18 06:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (462 votes), past polls