[Catalyst] Restricting access to the model
Matt S Trout
dbix-class at trout.me.uk
Tue Jul 4 00:40:09 CEST 2006
Nilson Santos Figueiredo Junior wrote:
> On 7/3/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
>> and C::M::DBIC::Schema gives you a model per table. I'm not sure I see the
>> problem here ...
>
> From Catalyst::Model::DBIC::Schema docs there's an example which reads:
>
> # For resultsets, there's an even quicker shortcut:
> $c->model('FilmDB::Actor')
> # is the same as $c->model('FilmDB')->resultset('Actor')
>
> So, from this example, I concluded that only FilmDB was a proper
> Catalyst model. FilmDB::Actor was only a shortcut, not a real model.
>
> But I think I was mislead by the docs, then.
That's cos it generates an ACCEPT_CONTEXT on FilmDB::Actor. It's still a real
class, albeit one auto-generated via compose_namespace.
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Catalyst
mailing list