[Templates-cvs] cvs commit: Template2/lib Template.pm
cvs@template-toolkit.org
cvs@template-toolkit.org
Thu, 24 Jul 2003 17:16:26 +0100
cvs 03/07/24 16:16:26
Modified: lib Template.pm
Log:
version 2.10
Revision Changes Path
2.69 +20 -5 Template2/lib/Template.pm
Index: Template.pm
===================================================================
RCS file: /template-toolkit/Template2/lib/Template.pm,v
retrieving revision 2.68
retrieving revision 2.69
diff -u -r2.68 -r2.69
--- Template.pm 2003/04/29 12:38:58 2.68
+++ Template.pm 2003/07/24 16:16:25 2.69
@@ -17,7 +17,7 @@
# modify it under the same terms as Perl itself.
#
# REVISION
-# $Id: Template.pm,v 2.68 2003/04/29 12:38:58 abw Exp $
+# $Id: Template.pm,v 2.69 2003/07/24 16:16:25 abw Exp $
#
#========================================================================
@@ -38,7 +38,7 @@
## This is the main version number for the Template Toolkit.
## It is extracted by ExtUtils::MakeMaker and inserted in various places.
-$VERSION = '2.09c';
+$VERSION = '2.10';
$ERROR = '';
$DEBUG = 0;
@@ -307,7 +307,7 @@
my $tt = Template->new(INCLUDE_PATH => '/tmp', POST_CHOMP => 1)
|| die $Template::ERROR, "\n";
-=head2 process($template, \%vars, $output)
+=head2 process($template, \%vars, $output, %options)
The process() method is called to process a template. The first
parameter indicates the input template as one of: a filename relative
@@ -386,6 +386,21 @@
return OK;
}
+After the optional third output argument can come an optional
+reference to a hash or a list of (name, value) pairs providing further
+options for the output. The only option currently supported is
+"binmode" which, when set to any true value will ensure that files
+created (but not any existing file handles passed) will be set to
+binary mode.
+
+ # either: hash reference of options
+ $tt->process($infile, $vars, $outfile, { binmode => 1 })
+ || die $tt->error(), "\n";
+
+ # or: list of name, value pairs
+ $tt->process($infile, $vars, $outfile, binmode => 1)
+ || die $tt->error(), "\n";
+
The OUTPUT configuration item can be used to specify a default output
location other than \*STDOUT. The OUTPUT_PATH specifies a directory
which should be prefixed to all output locations specified as filenames.
@@ -923,11 +938,11 @@
=head1 VERSION
-Template Toolkit version 2.09b, released on 24 April 2003.
+Template Toolkit version 2.10, released on 24 July 2003.
=head1 COPYRIGHT
- Copyright (C) 1996-2002 Andy Wardley. All Rights Reserved.
+ Copyright (C) 1996-2003 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