-module AwayMsg;
package AwayMsg;
+
use strict;
use warnings;
+use DBI;
+
BEGIN {
use Exporter ();
our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
$VERSION = 1.00;
@ISA = qw(Exporter);
- @EXPORT = qw(&db_connect $dhb);
+ @EXPORT = qw(&db_connect $dbh);
%EXPORT_TAGS = ( );
@EXPORT_OK = qw();
}
+our ($dbh);
+
sub db_connect () {
my $h = DBI->connect("dbi:SQLite:away.db",
{ AutoCommit=>0,
RaiseError=>1, ShowErrorStatement=>1
})
- or die "$DBI:errstr ?";
+ or die "$DBI::errstr ?";
$dbh->do("BEGIN");
return $h;
}
+
+1;