[Catalyst] YAML config embedded path_to mysql_read_default_file

Jason Kohles email at jasonkohles.com
Mon Mar 19 13:51:37 GMT 2007


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)__

-- 
Jason Kohles
email at jasonkohles.com
http://www.jasonkohles.com/
"A witty saying proves nothing."  -- Voltaire





More information about the Catalyst mailing list