[Catalyst] Documentation for Catalyst::Model::DBIC

J. Shirley jshirley at gmail.com
Tue Aug 19 16:02:13 BST 2008


On Tue, Aug 19, 2008 at 2:10 AM, Terence Monteiro
<terence at deeproot.co.in> wrote:
> Hello,
>
> I was looking to move connection info from my application's model DBIC
> class to the YAML configuration, but could not find anything in the pod for
> Catalyst::Model::DBIC::Schema. The only code was:
>
>  __PACKAGE__->config(
>      schema_class => 'MyApp::Schema::FilmDB',
>      connect_info => [
>                        "DBI:...",
>                        "username",
>                        "password",
>                        {AutoCommit => 1}
>                      ]
>  );
>
> I could not find any documentation about how to supply a model's
> configuration parameters in the YAML in Catalyst::Model, since this is
> generic to all models. I finally found documentation in
> Catalyst::Model::Adaptor for this, and applied it:
>
> Model::DBIC:
>        schema_class: 'MyApp::Schema::FileDB'
>        connect_info:
>                - 'dbi:Pg:dbname=myapp'
>                - 'postgres'
>                - ''
>                - AutoCommit: 1
>
> Can I edit the pod for Catalyst::Model::DBIC::Schema with this example
> and/or Catalyst::Model and send it to the author/documenter?
>
> --
> Thanks and Regards,
> Terence Monteiro.
>
> DeepRoot Linux,
> Ph: +91 (80) 4112 4784 / 85.
>

Due to whitespace issues with YAML and POD, you never want to put YAML
syntax in POD.  So, to answer your short question: No.

You can, however, use ysh to dump perl code into and get valid YAML back.

-J



More information about the Catalyst mailing list