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 468e9f072b15005c7658dc1009bea3d126a2dea9..9fdf742ed366720ed91c562abfdf0d14d10143d9 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 de9a0a3b9b4ab9238acde36d15881e0a3a2e181c..8a2533f3dec18ece1ce9ec8efc8139ad5f29bf60 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>