[Catalyst] About Model naming

Eric W. Bates ericx at vineyard.net
Thu Jun 15 19:40:37 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Another n00b question.

I have successfully created a Model utilizing DBIx::Class::Schema and a
Controller to successfully display a resultset. However, I'm confused
about the package naming for the Model.

Catalyst root is HG.

The DBIx::Class::Schema definitions are:
HG/lib/HG/Schema.pm		package HG::Schema
HG/lib/HG/Schema/Plants.pm	package HG::Schema::Plants
   etc..

The Model is:
HG/lib/HG/Model/HorshamDB.pm	package HG::Model::HorshamDB
				schema_class HG::Schema

My confusion occurs in the Controller, when I invoke the model the
package name that works is 'HorshamDB::Plants'. I originally tried:
HG::Model::HorshamDB
HG::Model::HorshamDB::Plants
HG::Schema
HG::Schema::Plants

Perhaps in the context of $c->model() I'm not really loading a package?

Thanks for your time.

- --
Eric W. Bates
ericx at vineyard.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEkZuVD1roJTQ4LlERAkNfAJ9z9h2ffF0aL844gTzeCyEE7frc6ACeMiEc
qVJxByGSL6y7S6epxN0aeQk=
=rFNC
-----END PGP SIGNATURE-----



More information about the Catalyst mailing list