Changeset 1813

Show
Ignore:
Timestamp:
05/09/06 16:46:18
Author:
miyagawa
Message:

Load config file from root/config.yaml which you have to copy or symlink.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • PlaggerLDR/trunk/lib/PlaggerLDR/Controller/API.pm

    r1809 r1813  
    55use base 'Catalyst::Controller'; 
    66 
    7 use lib "/home/miyagawa/svk/plagger/plugins/Plagger-Plugin-Store-DBIC/lib"; 
     7#use Plagger::Schema::SQLite; 
     8use YAML; 
     9use List::Util qw(first); 
    810use Plagger::Schema::SQLite; 
    911 
    10 my $schema = Plagger::Schema::SQLite->connect('dbi:SQLite:/home/miyagawa/plagger.db'); 
     12my $config = YAML::LoadFile( PlaggerLDR->path_to('root', 'config.yaml') ); 
     13my $module = first { $_->{module} eq 'Store::DBIC' } @{$config->{plugins}}; 
     14my $schema = Plagger::Schema::SQLite->connect(@{$module->{config}->{connect_info}}); 
    1115 
    1216sub default : Private {