+ 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;
+ }
+