chiark / gitweb /
wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 29 Aug 2012 23:18:35 +0000 (00:18 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 29 Aug 2012 23:18:35 +0000 (00:18 +0100)
AwayMsg.pm
mason/.perl-lib [new symlink]
mason/check [new file with mode: 0755]
mason/main

index 468e9f0..9fdf742 100644 (file)
@@ -1,25 +1,29 @@
-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");
 
@@ -46,3 +50,5 @@ sub db_connect () {
 
     return $h;
 }
+
+1;
diff --git a/mason/.perl-lib b/mason/.perl-lib
new file mode 120000 (symlink)
index 0000000..a96aa0e
--- /dev/null
@@ -0,0 +1 @@
+..
\ No newline at end of file
diff --git a/mason/check b/mason/check
new file mode 100755 (executable)
index 0000000..56a1be1
--- /dev/null
@@ -0,0 +1,7 @@
+<html><head><title>Stuff</title></head>
+<body><pre>
+@INC = <% join ':', @INC |h %>
+% foreach my $e (sort keys %ENV) {
+<% $e |h%>=<% $ENV{$e} |h%>
+% }
+</body>
index de9a0a3..8a2533f 100755 (executable)
@@ -1,7 +1,6 @@
-<%doc>
-<%/doc>
 <%init>
 use AwayMsg;
+</%init>
 <html lang="en"><head>
 <title>Email "out of office" setup</title>
 </head><body>