git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
word: database module to connect to postgres
[sheet.git]
/
writer.plp
diff --git
a/writer.plp
b/writer.plp
index 7cbe9e659b78d3e3b68f95fd8c4d7bcb9aa14941..493f74534b3f5961253b6b4fe224a4e5451363fc 100644
(file)
--- a/
writer.plp
+++ b/
writer.plp
@@
-13,16
+13,9
@@
EOT
use List::Util qw( pairs pairkeys );
my $db = eval {
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, $@);
} or Abort('Database error', 501, $@);
-$db->abstract->{array_datatypes}++;
my $user = eval {
if (defined $post{username}) {
my $user = eval {
if (defined $post{username}) {