[Catalyst] Caching problem?

Brandon Black blblack at gmail.com
Fri Jan 13 22:25:00 CET 2006


On 1/13/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
> On Fri, Jan 13, 2006 at 11:19:52AM -0600, Brandon Black wrote:
> > On 1/13/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
> > > Right, that's the lines I was thinking along - does anybody fancy doing up
> > > a patch for this? It's not likely to get to the top of my to-do list amazingly
> > > soon, I'm afraid.
> > >
> >
> > I could take a stab at it.  I'm assuming the general idea should be an
> > optional new C::P::Base class which creates the plugin_for accessor
> > for those that want to inherit and use it, and then mod the plugin
> > loader code to look for it when loading plugins.
>
> Shouldn't even need that - you can check the existence of plugin_for using
> ->can then it'd just be a matter (for your example) of adding
>
> sub plugin_for { 'Response' }
>

Attached is a draft of a patch against trunk.  It generalizes the
concept for plugging into any component (Request, Response, Engine,
Dispatcher, etc, although I can't think of how or why people would use
the last two yet) using plugin_for as above.  Also added a section to
C::Manual::WritingPlugins with an example for plugging into Response.

Feedback welcome, I'm new to a lot of this stuff :)

-- Brandon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plugin_to_components.diff
Type: application/octet-stream
Size: 5410 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060113/7085aef5/plugin_to_components.obj


More information about the Catalyst mailing list