On Thu, Apr 18, 2002 at 03:14:09PM -0700, Randal L. Schwartz wrote:
> TT2CompileDir /web/stonehenge/perl-tt2/cache
> TT2CompileDir /web/stonehenge/perl-tt2/cache/
How strange... I'm sure I already replied to this message. Must have
got lost or maybe I didn't CC the list...
Anyway, the problem is a patch I applied in 2.06g to fix a taint
problem in the Template::Provider. It also had a change which added
one less '/' than it should have done.
Anyway, it's fixed in the CVS now. I'll do a developer release some time
next week.
Diffs below.
Cheers
A
Index: lib/Template/Provider.pm
===================================================================
RCS file: /template-toolkit/Template2/lib/Template/Provider.pm,v
retrieving revision 2.50
retrieving revision 2.51
diff -u -r2.50 -r2.51
--- lib/Template/Provider.pm 2002/04/17 14:04:40 2.50
+++ lib/Template/Provider.pm 2002/04/19 09:20:39 2.51
@@ -27,7 +27,7 @@
#
#----------------------------------------------------------------------------
#
-# $Id: Provider.pm,v 2.50 2002/04/17 14:04:40 abw Exp $
+# $Id: Provider.pm,v 2.51 2002/04/19 09:20:39 abw Exp $
#
#============================================================================
@@ -44,7 +44,7 @@
use File::Basename;
use File::Spec;
-$VERSION = sprintf("%d.%02d", q$Revision: 2.50 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 2.51 $ =~ /(\d+)\.(\d+)/);
# maximum time between performing stat() on file to check staleness
$STAT_TTL = 1 unless defined $STAT_TTL;
@@ -308,10 +308,8 @@
my $wdir = $dir;
$wdir =~ s[:][]g if $^O eq 'MSWin32';
$wdir =~ /(.*)/; # untaint
- &File::Path::mkpath($cdir . $1);
+ &File::Path::mkpath(File::Spec->catfile($cdir, $1));
}
- # ensure $cdir is terminated with '/' for subsequent path building
- $cdir .= '/';
}
$self->{ LOOKUP } = { };
@@ -476,8 +474,6 @@
($data, $error) = (undef, Template::Constants::STATUS_DECLINED);
} # INCLUDE
-# printf "returning ($data, %s)\n", defined $error ? $error : '<no error>';
-
return ($data, $error);
}
@@ -494,8 +490,9 @@
$path = $file;
$path =~ /^(.+)$/s or die "invalid filename: $path";
$path =~ s[:][]g if $^O eq 'MSWin32';
- $compiled = "$compdir$path$compext";
- $compiled =~ s[//][/]g;
+
+ $compiled = "$path$compext";
+ $compiled = File::Spec->catfile($compdir, $compiled) if length $compdir;
return $compiled;
}
@@ -1241,17 +1238,17 @@
=head1 VERSION
-2.49, distributed as part of the
+2.50, distributed as part of the
Template Toolkit version 2.07, released on 17 April 2002.
=head1 COPYRIGHT
- Copyright (C) 1996-2001 Andy Wardley. All Rights Reserved.
- Copyright (C) 1998-2001 Canon Research Centre Europe Ltd.
+ Copyright (C) 1996-2002 Andy Wardley. All Rights Reserved.
+ Copyright (C) 1998-2002 Canon Research Centre Europe Ltd.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
=head1 SEE ALSO
-L<Template|Template>, L<Template::Parser|Template::Parser>,
L<Template::Context|Template::Context>
\ No newline at end of file
+L<Template|Template>, L<Template::Parser|Template::Parser>,
+L<Template::Context|Template::Context>