4 |
use blib; |
use blib; |
5 |
use Fuse::DBI; |
use Fuse::DBI; |
6 |
|
|
7 |
|
my $template_dir = '/data/WebGUI/cms.rot13.org/uploads/temp/templates'; |
8 |
|
|
9 |
my $sql_filenames = q{ |
my $sql_filenames = q{ |
10 |
select |
select |
11 |
concat(templateid,name) as id, |
concat(templateid,name) as id, |
37 |
user => 'webgui', |
user => 'webgui', |
38 |
password => 'webgui', |
password => 'webgui', |
39 |
mount => $mount, |
mount => $mount, |
40 |
|
invalidate => sub { |
41 |
|
print STDERR "invalidating content in $template_dir\n"; |
42 |
|
opendir(DIR, $template_dir) || die "can't opendir $template_dir: $!"; |
43 |
|
map { unlink "$template_dir/$_" || warn "can't remove $template_dir/$_: $!" } grep { !/^\./ && -f "$template_dir/$_" } readdir(DIR); |
44 |
|
closedir DIR; |
45 |
|
} |
46 |
|
|
47 |
}); |
}); |
48 |
|
|
49 |
print "Press enter to exit..."; |
print "Press enter to exit..."; |