From: Dobrica Pavlinusic Date: Fri, 8 Oct 2004 23:44:34 +0000 (+0000) Subject: removed obsolete example X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=8cdd807937f3b43d46a97bbdd6383e951c92da88;p=Fuse-DBI removed obsolete example git-svn-id: svn://svn.rot13.org/fuse_dbi/trunk@29 17f4e80c-d0e0-0310-8903-bfc3ae804c12 --- diff --git a/examples/webgui-mysql.pl b/examples/webgui-mysql.pl deleted file mode 100755 index 2c0be57..0000000 --- a/examples/webgui-mysql.pl +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use blib; -use Fuse::DBI; - -my $template_dir = '/data/WebGUI/cms.rot13.org/uploads/temp/templates'; - -my $sql_filenames = q{ - select - concat(templateid,name) as id, - concat(namespace,'/',name,'.html') as filename, - length(template) as size, - iseditable as writable - from template ; -}; - -my $sql_read = q{ - select template - from template - where concat(templateid,name) = ?; -}; - -my $sql_update = q{ - update template - set template = ? - where concat(templateid,name) = ?; -}; - -my $mount = shift || '/mnt2'; - -my $mnt = Fuse::DBI->mount({ - filenames => $sql_filenames, - read => $sql_read, - update => $sql_update, - dsn => 'DBI:mysql:dbname=webgui_knjiznice_ffzg_hr', - user => 'webgui', - password => 'webgui', - mount => $mount, - invalidate => sub { - print STDERR "invalidating content in $template_dir\n"; - opendir(DIR, $template_dir) || die "can't opendir $template_dir: $!"; - map { unlink "$template_dir/$_" || warn "can't remove $template_dir/$_: $!" } grep { !/^\./ && -f "$template_dir/$_" } readdir(DIR); - closedir DIR; - } - -}); - -print "Press enter to exit..."; -my $foo = ; - -$mnt->umount;