aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authormattn <mattn.jp@gmail.com>2011-10-27 21:22:48 +0900
committermattn <mattn.jp@gmail.com>2011-10-27 21:22:48 +0900
commita1acbaffbd086ceb1fe4625ebb4413cc6a898cab (patch)
tree06c783732a007c2caa8366142bd625a8be330bc0 /template
parent3a67144b6ccf3291eb1f16db00427bf4e49dc62e (diff)
downloadvim-sonictemplate-a1acbaffbd086ceb1fe4625ebb4413cc6a898cab.tar.gz
vim-sonictemplate-a1acbaffbd086ceb1fe4625ebb4413cc6a898cab.tar.bz2
vim-sonictemplate-a1acbaffbd086ceb1fe4625ebb4413cc6a898cab.zip
add perl stuff.
Diffstat (limited to 'template')
-rw-r--r--template/dbi-sqlite.pl1
-rw-r--r--template/read-file.perl2
2 files changed, 3 insertions, 0 deletions
diff --git a/template/dbi-sqlite.pl b/template/dbi-sqlite.pl
new file mode 100644
index 0000000..6f66987
--- /dev/null
+++ b/template/dbi-sqlite.pl
@@ -0,0 +1 @@
+my $dbh = DBI->connect("dbi:SQLite:dbname={{_cursor_}}");
diff --git a/template/read-file.perl b/template/read-file.perl
new file mode 100644
index 0000000..53138a4
--- /dev/null
+++ b/template/read-file.perl
@@ -0,0 +1,2 @@
+open my $fh, '<', '{{_cursor}}' or die "failed to open: $!";
+my $content = do { local $/; <$fh> };