On Thu, Aug 10, 2006 at 10:54:32 -0700, Rodney Broom wrote: use is almost like a macro. require is a function.
That said, the way plugins/components are loaded will not change
for compatibility reasons.
I suggest you create
MyApp::Model::MySchema
and 'use' it there:
package MyAPp::Model::MySchema;
use base qw/Catalyst::Model/;
use MyApp::Schema::Main;
> With require(), I'm forced to call import() explicity in that package.
Where is it being required()'d? Why not just 'use' this at the top
of your model code?
Now, at this stage there's some heavy wheel reinvention going on.
Are you aware of Catalyst::Model::DBIC::Schema?
> Under Catalyst, I get all classes. Outside of Catalyst (scripts) I tend to
> only use what I need:
>
> # user_maint.pl
> use MyApp::Schema::Main qw(User);
> $schema = MyApp::Schema::Main->new($db_conn_name);
Is this for efficiency reasons?
--
Yuval Kogman <[EMAIL PROTECTED]>
http://nothingmuch.woobling.org 0xEBD27418
pgpOAzNlmzDh0.pgp
Description: PGP signature
_______________________________________________ List: [email protected] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
