[Catalyst] Preventing Catalyst from loading a Controller pm module

J. Shirley jshirley at gmail.com
Tue Oct 30 14:53:17 GMT 2007


On 10/30/07, Valentin Tumarkin <valentin-lists at fuzzycow.org> wrote:
>
> Hi,
>
> I was wondering if there's a "standard" way for preventing Catalyst from
> loading a Controller module. I would like to keep my base Controller modu=
les
> in the MyApp/Controller directory, but do not want Catalyst treating them=
 as
> http-client accessible modules.
>
> For example:
> MyApp/Controller/BaseController.pm
> MyApp/Controller/AdvancedBaseControllerClass.pm (uses BaseController)
> MyApp/Controller/ActualController.pm (uses AdvancedBaseController)
>
> At this time I'm putting my base classes in the MyApp/Base/.. directories,
> but this method just doesn't seem as "clean" to me.
>
> Thank you,
> Valentin
>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>
>
Look at the setup_components config key:

__PACKAGE__->config(
 setup_components =3D> { except =3D> qr/MyApp::Controller::Base/ }
);

The struct in setup_components is passed directly to Module::Pluggable, so
you can read the pod there to figure out exactly what you want.

-J


-- =

J. Shirley :: jshirley at gmail.com :: Killing two stones with one bird...
http://www.toeat.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20071030/07163=
648/attachment-0001.htm


More information about the Catalyst mailing list