Re: Need a contractor for HTML::Mason::Critic work

Dave Rolsky <[email protected]> Sat, 13 Oct 2007 23:55:24 -0500 (CDT)
Newsgroups gmane.comp.web.mason.devel
Message-ID <[email protected]>
On Sat, 13 Oct 2007, C.J. Adams-Collier wrote:

> I need someone who can help me make HTML::Mason::Critic (ie, Perl::Critic
> for Mason components) a reality.  Jon and I have mumbled back and forth
> about it, but I want to flesh it out.  This is a part of a larger project to
> build infrastructure around Mason as a "RAD" and "Agile" development system.

Well, I'm not really up to contributing dev time to this ATM, but I have 
some ideas about how it could work.

I suspect the best way to implement it would be to start by subclassing 
Mason's current ToObject compiler. You can override methods in there to 
check for Mason-specific things that might be bad. For example, this would 
be a good spot to check for abuse of <%perl> blocks (maybe too long, too 
many, any at all, etc).

Then let the superclass do its thing and generate a compiled component, 
which is pure Perl. At this point, you can run Perl::Critic against the 
compiled code to find other problems, like conditional declarations ("my 
$foo if ...").

If you're looking for ideas of Mason-specific policies to implement, I'm 
sure I could come up with some.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/