[Catalyst] Catalyst.pm code does what?

Carl Franks fireartist at gmail.com
Wed Jan 18 12:04:59 CET 2006


Thanks Yuval, that makes sense.

Cheers,
Carl


On 18/01/06, Yuval Kogman <nothingmuch at woobling.org> wrote:
> On Wed, Jan 18, 2006 at 10:44:10 +0000, Carl Franks wrote:
> > In Catalyst.pm , subroutine setup (line 659 - svn r3100)
> > what is this code supposed to do / why is it needed?
> >
> >
> >     # Call plugins setup
> >     {
> >         no warnings qw/redefine/;
> >         local *setup = sub { };
> >         $class->setup;
> >     }
>
> MyApp->setup goes to Catalyst::setup first, because at this stage
> MyApp isa Catalyst, but not any of the plugins.
>
> This loads all the plugins and components and what not, and then
> temporarily empties Catalyst::setup, and re-invokes MyApp->setup.
>
> This then goes into all the plugins' setup snippets, which call
> MyApp->NEXT::setup until the last one is reached, and it goes into
> the 'sub { }'.
>
> Basically it emulates the behavior that should happen if
> MyApp->setup was called and all the plugins are alreay loaded and
> in @MyApp::ISA
>
> --
>  ()  Yuval Kogman <nothingmuch at woobling.org> 0xEBD27418  perl hacker &
>  /\  kung foo master: MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM: neeyah!
>
>
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>
>
>
>



More information about the Catalyst mailing list