[Catalyst] YAML config embedded path_to mysql_read_default_file

apv apv at sedition.com
Tue Mar 20 19:32:16 GMT 2007


Worked perfectly, thanks. Sorry I didn't extrapolate from the docs to  
just try it. Once you showed it, it seemed obvious.

-Ashley

On Monday, Mar 19, 2007, at 05:51 US/Pacific, Jason Kohles wrote:

> On Mar 18, 2007, at 7:26 PM, apv wrote:
>
>> So, I would like to use a mysql connection file instead of putting  
>> the password and user in the config file. Can I get a path_to to work  
>> with this? I did Google and check the lists but couldn't find an  
>> answer. Where the "__HERE__" is is where the  
>> mysql_read_default_file=(path_to) goes.
>>
>>   Model::DBIC:
>>     schema_class: MyApp::Schema::DBIC
>>     connect_info:
>>        - "dbi:mysql:opendevil;__HERE__;"
>>        - ~
>>        - ~
>>
>
> If you are using Catalyst::Plugin::ConfigLoader to load your  
> configuration (if you aren't sure then you probably are, it's the  
> default), then you can do this...
>
> Model::DBIC:
>   schema_class: MyApp::Schema::DBIC
>   connect_info:
>     -  
> dbi:mysql:opendevil;mysql_read_default_file=__path_to(configfile.cfg)__




More information about the Catalyst mailing list