8 use File::Path qw(make_path);
9 use File::Basename qw (fileparse);
10 use File::Copy::Recursive qw(fcopy);
16 my @files = File::Find::Rule->file()
20 #initialize template toolkit
22 my $template = Template->new;
24 foreach my $file (@files) {
25 next if $file =~ /^$out_dir/;
26 next if $file =~ /$0$/;
27 if ($file =~ /\.tt2$/) {
29 $template->process($file, undef, \$output);
30 my ($name,$path,$suffix) = fileparse($file,qw (.tt2));
31 open (my $fh, '>', "$out_dir/$path/$name.html") or die "$!";
35 fcopy ($file, "$out_dir/$file");