Christopher Laco wrote:
> I know I've been down this thread before. When writing a framework that
> generates customized Catalyst apps, it would be a whole lot easier
> (well, more proper) to add plugins in lib/MyApp/Plugins, just like we do
> with controllers/models/view, than it is to molest the MyApp.pm 'use
> Catalyst' line to include custom plugins.
> 
> I'm assuming that it's just a matter of tweaking the Module::Pluggable
> search paths at the appropriate time when Cat is starting up.
> 
> Is this a planned feature for 5.8? Could it be?
> Yes, I'll volunteer to put some tuits on it if need be.
> 
> -=Chris

Just for giggles this morning, I started tinkering with a
Catalyst::Plugin::PluginLoader.

Can anyone in core tell me why things are in this particular order?

    setup {
        $class->setup_plugins
        $class->log->debug( "Loaded plugins:\n" . $t->draw . "\n" );
        ...
        # Call plugins setup
        {
            no warnings qw/redefine/;
            local *setup = sub { };
            $class->setup;
        }
    }


Since PluginLoader->setup is called after the Debug "loaded plugins"
output...it doesn't show the plugins just loaded by PluginLoader.

Is there some reason these are backwords on purpose, or is that just a
bug? It appears that other things are ok....

   $class->log->debug( "Loaded components:\n" . $t->draw . "\n" )

happens after

   setup_components

etc...

Aside from that...just loading plugins from ::Plugin or ::P works, along
with the same search_extra kinds of things setup_components does. Justs
needs tests and pod.

-=Chris 

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to