chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.web-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WIP route fixes etc.
[ypp-sc-tools.web-live.git]
/
yarrg
/
CommodsDatabase.pm
diff --git
a/yarrg/CommodsDatabase.pm
b/yarrg/CommodsDatabase.pm
index 2ea674d6963e489647b779fb880b464931fc1684..7bd7c77e1191055137e9b7fa43b45d2bec08263c 100644
(file)
--- a/
yarrg/CommodsDatabase.pm
+++ b/
yarrg/CommodsDatabase.pm
@@
-44,7
+44,8
@@
BEGIN {
$VERSION = 1.00;
@ISA = qw(Exporter);
@EXPORT = qw(&db_setocean &db_writer &db_connect $dbh
$VERSION = 1.00;
@ISA = qw(Exporter);
@EXPORT = qw(&db_setocean &db_writer &db_connect $dbh
- &db_filename &db_doall &db_onconflict &db_setdatadir);
+ &db_filename &db_doall &db_onconflict
+ &db_setdatadir $db_datadir);
%EXPORT_TAGS = ( );
@EXPORT_OK = qw();
%EXPORT_TAGS = ( );
@EXPORT_OK = qw();
@@
-52,14
+53,14
@@
BEGIN {
our $dbfn;
our $dbh;
our $dbfn;
our $dbh;
-our $datadir= '.';
+our $d
b_d
atadir= '.';
sub db_setdatadir ($) {
sub db_setdatadir ($) {
- $datadir= $_[0];
+ $d
b_d
atadir= $_[0];
}
sub db_setocean ($) {
my ($oceanname) = @_;
}
sub db_setocean ($) {
my ($oceanname) = @_;
- $dbfn= "$datadir/OCEAN-$oceanname.db";
+ $dbfn= "$d
b_d
atadir/OCEAN-$oceanname.db";
}
sub db_filename () {
return $dbfn;
}
sub db_filename () {
return $dbfn;
@@
-93,7
+94,6
@@
sub db_writer () {
}
sub db_connect () {
}
sub db_connect () {
- return if $dbh;
$dbh= DBI->connect("dbi:SQLite:$dbfn",'','',
{ AutoCommit=>0,
RaiseError=>1, ShowErrorStatement=>1,
$dbh= DBI->connect("dbi:SQLite:$dbfn",'','',
{ AutoCommit=>0,
RaiseError=>1, ShowErrorStatement=>1,