Currently, if there are any explicit files on @ARGV (versus just relying
on srcdir), ttree will internally call $template->process directly
bypassing all the processing that happens in the [EMAIL PROTECTED] case
via the function process_file():
  - suffix mapping (my previous patch)
  - mtime and accept checking
  - permission preserving
  - copy processing

(I discovered when I noticed that my patched ttree didn't do the
suffix processing when I had an explicit file on the command line.)

Here is how I've patched my local copy:

if (@ARGV) {
    # explicitly process files specified on command lines
    foreach my $file (@ARGV) {
        process_file($file, $srcdir ? "$srcdir/$file" : $file);
#       print "  + $file\n" if $verbose;
#       $template->process($file, $replace, $file)
#           || print "  ! ", $template->error(), "\n";
    }
}

Note that this does change behavior; there may be people reliant on the
old behavior of not doing all of process_file's functionality.

-mda



_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to