I have an application using DBIx::Class::Schema. In the application config file, I have:

<Model::DB>
 schema_class MyApp::Schema
<connect_info>
 ...various necessary stuff here...
</connect_info>
</Model::DB>

<Controller::One>
 someattribute value
</Controller::One>

<DB::Two>
 anotherattribute anothervalue
</DB::Two>


The first two of these blocks do what I expect -- my models
get build from the Schema/Result files, I get connections, etc.
And in Controller/One.pm, I can access $self->{someattribute}

But I can't for the life of my figure out how I can get anotherattribute
into the config for an individual model based on the schema.
That is, I'd like methods in DB::Two objects to have access
to $self->{anotherattribute}

In addition to the above, I have tried:

* Variations on the config block (<myapp::Model::DB::Two>, <Model::DB::Two>,
 <Two>, even <MyApp::Schema::Result::Two>)
* Putting that block within the <Model::DB> block, again with all those variations

I haven't found the answer so far in searching this mailing list
or the web. Is this possible? What am I missing here?
Thanks in advance!

- Alan



_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to