ironcamel / Dancer-Plugin-DBIC

DBIx::Class Plugin for Dancer
1 stars 13 forks source link

added support for schema aliases #12

Closed ironcamel closed 10 years ago

ironcamel commented 10 years ago

This still needs POD documentation.

ironcamel commented 10 years ago

Added POD documentation.

alnewkirk commented 10 years ago

+1

Not sure if you knew but YAML supports aliases, which is cool, I never use em though, e.g. --- plugins: DBIC: default: &default dsn: dbi:Pg:dbname=master schema_class: MyApp::Schema slave1: *default

alnewkirk commented 10 years ago

Yeah, that's cool, I was referring to doing the following as opposed to how you did it: my @conn_info = $options->{connect_info} ? @{$options->{connect_info}} : @$options{qw(dsn user pass options)}; $conn_info[2] //= $options->{password} if 'HASH' eq ref $options;

... I was just curious, doesn't bother me either way. Long as it works, which it does :)

alnewkirk commented 10 years ago

That is slightly different logic but effectively the same.