/[Frey]/trunk/lib/A3C/Schema.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/lib/A3C/Schema.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 343 - (show annotations)
Sun Nov 9 10:54:51 2008 UTC (15 years, 5 months ago) by dpavlin
File size: 391 byte(s)
A3C::Schema dsn to config
1 package A3C::Schema;
2
3 use Fey::ORM::Schema;
4 use Frey::Schema;
5
6 with 'Frey::Config';
7
8 use Data::Dump qw/dump/;
9 my $dsn = __PACKAGE__->config( __PACKAGE__ )->{dsn}; # FIXME yaaaack
10
11 my ( $schema, $source ) = Frey::Schema->schema_source( $dsn );
12
13 has_schema $schema;
14
15 __PACKAGE__->DBIManager()->add_source($source);
16
17 $source->dbh->do( qq{ set client_encoding = 'utf-8' } ) if $dsn =~ /Pg/;
18
19 1;

  ViewVC Help
Powered by ViewVC 1.1.26