[Catalyst] Configuring Catalyst::Model::DBIC::Schema from YAML
    Matthieu Codron 
    matthieu at codron.org
       
    Sun Oct  1 20:51:54 CEST 2006
    
    
  
Hi,
Ash Berlin a écrit :
> Jon Warbrick wrote:
>> Can a Catalyst::Model::DBIC::Schema model be configured from a YAML 
>> file via Catalyst::Plugin::Config::YAML? If so, how? Apologies if it's in 
>> the documentation somewhere, but if so I've yet to find it...
>>
>> Jon.
>>
>>   
> The answer is yes. Strip off "Catalyst::" from the component name. e.g.
> 
> name: MyApp
> Model::MyModel:
>   arg1: foo
>   arg2:
>     - bar
>     - baz
> View::TT
>   DEBUG: 1
> 
> As to where it's documented, I cant seem to find it, but I'm sure it is 
> somewhere, tho its clearly not obvious enough since I know its there and 
> cant find it.
I found it here: 
http://search.cpan.org/~mramberg/Catalyst-Runtime-5.7003/lib/Catalyst/Component.pm#COMPONENT(%24c%2C_%24arguments)
But it was not quite obvious ... Putting database connection information 
in config files is really basic stuff. An example in the tutorial could 
be very useful to lots of people, I think.
-- 
Matthieu
    
    
More information about the Catalyst
mailing list