[Catalyst] External plugins (continued)

Brandon Black blblack at gmail.com
Fri Feb 17 23:28:30 CET 2006


On 2/17/06, Ovid <publiustemp-catalyst at yahoo.com> wrote:
> --- "Christopher H. Laco" <claco at chrislaco.com> wrote:
>
> > Brandon Black wrote:
> > > Then we can do "use Catalyst qw/ StaticSimple DoTheDishes
> > > +Foo::Bar/;", and it will find Catalyst::Plugin::StaticSimple,
> > > MyApp::Plugin::DoTheDishes, and Foo::Bar.
> > >
> > > -- Brandon
> >
> > And is +Foo::Bar  really MyApp::Plugin::Foo::Bar?
> > What about the people who want +Foo::Bar to really load Foo::Bar ?
>
> Class XP principle:  do the simplest thing which can possibly work.
>
> Right now, having the unary plus means "take this literally".  Trying
> to overload it into meaning "take this literally unless I don't mean
> take it literally in which case search some directories" is not good.
>
> While I do like this:
>
>   MyApp/Model
>   MyApp/View
>   MyApp/Controller
>   MyApp/Plugin
>
> In reality, I think the latter one should be explicitly declared:
>
>  use Catalyst qw(
>    DateTime
>    +MyApp::Plugin::DoesTheDishes
>  );
>
> Why?  Because it solves the problem and it's really simple to
> implement.
>
> Simplicity++
> Bugs--
>
> Cheers,
> Ovid
>
>

Apparently I accidentally responded to just Chris earlier. doh.

Anyways, what I meant a couple of emails ago was: the plus-sign still
means literal classnames, but the non-plus-sign ones also search
MyApp::Plugin in addition to Catalyst::Plugin.  I don't think it
introduces anything really horrible to have the non-plus-sign ones get
searched in two different namespaces would it?

+Foo::Bar always means literal class Foo::Bar
Foo::Bar means try MyApp::Plugin::Foo::Bar and then Catalyst::Plugin::Foo::Bar

-- Brandon



More information about the Catalyst mailing list