X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/c6d80876bdce00b6e71600f83b58e0afcb481495..74d561810b2bf81617b84bc1581d8b59c359d5c9:/writer.plp diff --git a/writer.plp b/writer.plp index 7cbe9e6..493f745 100644 --- a/writer.plp +++ b/writer.plp @@ -13,16 +13,9 @@ EOT use List::Util qw( pairs pairkeys ); my $db = eval { - my @dbinfo = ( - 'DBI:Pg:dbname=sheet;host=localhost', 'sheetadmin', 'fairuse', - ) or die "database not configured\n"; - require DBIx::Simple; - DBIx::Simple->new(@dbinfo[0..2], { - RaiseError => 1, - pg_enable_utf8 => 1, - }); + require Shiar_Sheet::DB; + Shiar_Sheet::DB->connect; } or Abort('Database error', 501, $@); -$db->abstract->{array_datatypes}++; my $user = eval { if (defined $post{username}) {