The run method has been broken up a bit but into __get_body and __get_runmode. Not particularly overridable but it has been broken out. The run method is almost nothing more than a list of callbacks now.<br><br>Mark did change from Class::ISA to Class::MOP (Moose underpinings) to examine the parent classess of the currently running app (which was used when doing callbacks) but reverted back to Class::ISA after he determined there was a performance hit when using Class::MOP. I wasn't aware that he had been playing with a full Moose implementation though.<br>
<br>Also, I added a function for headers after reading Cees complaint in the comments of CGI::Application::Plugin::Session. That is, header_props clobbers all the current headers, header_add will merge together multiple headers of the same name if needed but doesn't clobber the previous values. I've added header_set which is essentially the same as head_add but it does clobber each individual key.<br>
<br>For example if you did $self->header_add( -cookie => $cookie ) and then called $self->header_add( -cook => $another_cookie ), the two would be rolled together and both cookies set. With header_set, if you do $self->header_add( -cookie => $cookie ) and then later did $self->header_set( -cookie => $another_cookie ), the $cookie gets clobbered. This way you don't have to do a full header_props call to replace one particular header. The adapted version of CAP::Plugin::Session actually uses that now.<br>
<br>As to HTML::Template coupling... shall I incorporate CAP::Plugin::AnyTemplate into the core? :) My shamelessness and theivery knows no bounds.<br><br>D<br><br><br><div class="gmail_quote">On Fri, Oct 31, 2008 at 4:05 PM, Michael Graham <span dir="ltr"><<a href="mailto:magog@the-wire.com">magog@the-wire.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
> So, anyone have a part of CGI::App that they particularly hate? :)<br>
<br>
</div>I can't remember all the details of what people were talking about. I<br>
do remember:<br>
<br>
* the run method does too much and is hard to override - it should be<br>
broken up into smaller, easily-overridable methods. (This might<br>
have been done already.)<br>
* HTML::Template is too tightly coupled<br>
* managing HTTP headers is a complete pain<br>
<div class="Ih2E3d"><br>
> I'm kinda terrified to mention it on the CGI::App mailing list for<br>
> fears of getting back "are you insane... lightweight web framework +<br>
> moose = oxymoron!"<br>
<br>
</div>As long as you're careful to label it a research project and not a<br>
replacement, I don't think you'll get much flamage on the CGI::App<br>
list.<br>
<br>
Also, I think Mark Stosberg started a rewrite of CGI::App awhile back in<br>
Moose, didn't he? Or was it in in Pugs?<br>
<br>
<br>
Michael<br>
<br>
<br>
<br>
On Fri, 31 Oct 2008 11:55:48 -0400<br>
<div><div></div><div class="Wj3C7c">"Dave Doyle" <<a href="mailto:dave.s.doyle@gmail.com">dave.s.doyle@gmail.com</a>> wrote:<br>
<br>
> Well, I've got virtually 100% now. The only thing it's not doing is<br>
> allowing you to use QUERY, TMPL_PATH and PARAMS in the constructor<br>
> (they must be lowercase).<br>
><br>
> Full test suite is passing now. Any suggestions for improvement is<br>
> more than welcome. :) As I said, I've incorporated TT and a stash.<br>
> I was thinking of chucking the callback system altogether since Moose<br>
> allows you run code before/after/around any method. Roles/Plugins<br>
> that compose into the main class can use these hooks as well. I'm<br>
> not sure if a plugin author would find that appealing though. I<br>
> guess it depends. I've also made some minor cosmetic changes as I'm<br>
> a fan of the ternary operator instead of if(condition) { x =<br>
> something } else { x = something else}.<br>
><br>
> So, anyone have a part of CGI::App that they particularly hate? :)<br>
><br>
> I guess I'll see when i get my PAUSE id (how long does that take<br>
> anyhow it's been a little bit but I haven't heard back?) i can throw<br>
> it up on CPAN and see if anyone is interested. I'm kinda terrified<br>
> to mention it on the CGI::App mailing list for fears of getting back<br>
> "are you insane... lightweight web framework + moose = oxymoron!"<br>
> This is, after all, going to be the first thing I try and put on CPAN.<br>
><br>
> D<br>
><br>
> On Thu, Oct 30, 2008 at 5:08 PM, Michael Graham <<a href="mailto:magog@the-wire.com">magog@the-wire.com</a>><br>
> wrote:<br>
><br>
> ><br>
> ><br>
> > You have my blessing for anything you steal. I know you're going<br>
> > for 100% compatibility, but it might be a good project for doing<br>
> > some refactoring of some of the rough edges in cgiapp...<br>
> ><br>
> ><br>
> > Michael<br>
> ><br>
> ><br>
> > On Thu, 30 Oct 2008 15:21:17 -0400<br>
> > "Dave Doyle" <<a href="mailto:dave.s.doyle@gmail.com">dave.s.doyle@gmail.com</a>> wrote:<br>
> ><br>
> > > Well... despite my message asking about the meeting it looks like<br>
> > > I'll be unable to attend tonight.<br>
> > ><br>
> > > However, if we're running into a shortage of talks, I can<br>
> > > volunteer to put something together about Moose for next month or<br>
> > > whenever after. After my lightening talk and continued hacking<br>
> > > on Moose::CAP I've learned a lot more (and realized some stupid<br>
> > > mistakes in what I was doing) and can probably help others get a<br>
> > > start on things.<br>
> > ><br>
> > > I can also do more on what I've done with Moose::CAP. I've<br>
> > > actually applied for a PAUSE id to upload it to CPAN. I've<br>
> > > actually renamed it Sanguine (provided the PAUSE admins accept me<br>
> > > and approve the new namespace). I've also incorporated<br>
> > > CGI::Application::Plugin::Forward (sorry for stealing Michael...<br>
> > > but I give credit!), CGI::Application::Plugin::Redirect (I'm not<br>
> > > sure if Cees is on here... but I've stolen from him in other<br>
> > > places too) as well as incorporated a stash and TT. I've also<br>
> > > ported:<br>
> > ><br>
> > > CGI::Application::Plugin::DBH<br>
> > > CGI::Application::Plugin::Session<br>
> > > CGI::Application::Plugin::ValidateRM<br>
> > > CGI::Application::Plugin::FillInForm<br>
> > ><br>
> > > to Moose roles using different patterns depending on the needs of<br>
> > > the plugin which could be of interest.<br>
> > ><br>
> > > So if any of that sounds of interest, let me know.<br>
> > ><br>
> > > Thanks,<br>
> > > Dave<br>
> > ><br>
> ><br>
> ><br>
> > --<br>
> > Michael Graham <<a href="mailto:magog@the-wire.com">magog@the-wire.com</a>><br>
> ><br>
><br>
><br>
><br>
<br>
<br>
--<br>
</div></div><div><div></div><div class="Wj3C7c">Michael Graham <<a href="mailto:magog@the-wire.com">magog@the-wire.com</a>><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><a href="mailto:dave.s.doyle@gmail.com">dave.s.doyle@gmail.com</a><br>