[Catalyst] 'require' vs 'use' in Catalyst*

Rodney Broom rbroom+catalyst at rbroom.com
Fri Aug 11 06:29:53 CEST 2006

From: "Rodney Broom" <rbroom+catalyst at rbroom.com>

> From: "Yuval Kogman" <nothingmuch at woobling.org>

> Where is it being required()'d?


> Why not just 'use' this at the top of your model code?

Initially, because that isn't how the C::M::DBIC::Schema docs said to do it.

> Now, at this stage there's some heavy wheel reinvention going on.
> Are you aware of Catalyst::Model::DBIC::Schema?

Heh, yes, my model:

  package MyApp::Model::Main;
  use base qw(Catalyst::Model::DBIC::Schema);

    schema_class => 'MyApp::Schema::Main'

> > Under Catalyst, I get all classes. Outside of Catalyst (scripts) I
> > tend to only use what I need:
> Is this for efficiency reasons?

Yes. Am I missing something in relation to avoiding loading 50+ modules when I only need one?

Rodney Broom

More information about the Catalyst mailing list