[Catalyst-dev] Feature request: post_setup.

Oleg Pronin syber.rus at gmail.com
Sun Dec 23 17:56:45 GMT 2007


It is very often and in many applications and plugins needed to do something
on the setup phase after all of applications models, view etc have been
initialized.
For example, a dynamic admin interface plugin needs to initialize its data
using infomation from all avaliable models.
The 'setup' callback is called before any model, controller and view have
been initialized.
Therefore it would be cool to add the 'post_setup' callback which will be
called on application's mixin right before the end of setup:

In Catalyst.pm in 'setup' method right before expression:

    $class->setup_finished(1);

$class->post_setup if $class->can('post_setup');

And maybe:
    while (my ($comp_class, $instance) =3D each %{$class->components}) {
        $instance->post_setup($class)
            if $comp_class->can('post_setup') and !$comp_class->isa($class);
    }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst-dev/attachments/20071223/c=
47385be/attachment.htm


More information about the Catalyst-dev mailing list