X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/31a341925c07c850260b269047f9ed2fd0b6c006..e3fb22aca3122b87432194fb49ddfa8a5c8c95e2:/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}) {