chiark
/
gitweb
/
~ian
/
nj-awaymsg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mason diversion etc.
[nj-awaymsg.git]
/
AwayMsg.pm
diff --git
a/AwayMsg.pm
b/AwayMsg.pm
index acfb0ce848d64d2876085ec7245458583bc8d227..72c594695e69c9bd1ad84bc2f4e2c4d13d6de7ae 100644
(file)
--- a/
AwayMsg.pm
+++ b/
AwayMsg.pm
@@
-31,14
+31,7
@@
sub hquote ($) {
}
sub db_connect () {
}
sub db_connect () {
- my $dbf;
- foreach my $d (@INC) {
- $dbf = "$d/data/away.db";
- if (stat $dbf) {
- chdir($d) or die $!;
- last;
- }
- }
+ my $dbf = "$ENV{'NJAWAYMSG'}/data/away.db";
$dbh = DBI->connect("dbi:SQLite:$dbf",'','',
{ AutoCommit=>0,
RaiseError=>1, ShowErrorStatement=>1
$dbh = DBI->connect("dbi:SQLite:$dbf",'','',
{ AutoCommit=>0,
RaiseError=>1, ShowErrorStatement=>1