Re: Auditing mason components programmatically

Dave Rolsky <[email protected]> Fri, 21 Sep 2007 23:17:11 -0500 (CDT)
Newsgroups gmane.comp.web.mason.devel
Message-ID <[email protected]>
On Thu, 20 Sep 2007, C.J. Adams-Collier wrote:

> http://colliertech.org/index.php/HTML::Mason::Manage
>
> Can someone tell me where I should start?  Will
> Mason::Component->fetch_comp() give me component attributes, method
> list, shared_vars, etc. without much trouble?

It might be more effective to just write your own compiler subclass that 
records the info you want. You'd get a lot more fine-grained detail and 
you wouldn't have to do things like parse the <%args> blocks, since that 
would be done for you.

If you look in the repo, there's a module named 
HTML::Mason::Compiler::Events that implements a very simple compiler 
subclass that just echoes out little bits of info about a component as its 
called. I haven't used it in a long time, but it might be a good start for 
a new compiler.


-dave

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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/