[Templates-cvs] cvs commit: Template2/lib Template.pm

cvs@template-toolkit.org cvs@template-toolkit.org
Mon, 04 Oct 2004 11:24:11 +0100


cvs         04/10/04 10:24:11

  Modified:    lib      Template.pm
  Log:
  * bumped version number
  
  Revision  Changes    Path
  2.80      +19 -13    Template2/lib/Template.pm
  
  Index: Template.pm
  ===================================================================
  RCS file: /template-toolkit/Template2/lib/Template.pm,v
  retrieving revision 2.79
  retrieving revision 2.80
  diff -u -r2.79 -r2.80
  --- Template.pm	2004/10/04 10:11:59	2.79
  +++ Template.pm	2004/10/04 10:24:10	2.80
  @@ -17,7 +17,7 @@
   #   modify it under the same terms as Perl itself.
   #
   # REVISION
  -#   $Id: Template.pm,v 2.79 2004/10/04 10:11:59 abw Exp $
  +#   $Id: Template.pm,v 2.80 2004/10/04 10:24:10 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.13';
  +$VERSION     = '2.14';
   $ERROR       = '';
   $DEBUG       = 0;
   $BINMODE     = 0 unless defined $BINMODE;
  @@ -286,8 +286,8 @@
   array of configuration items may be passed as a parameter.
   
       my $tt = Template->new({
  -	INCLUDE_PATH => '/usr/local/templates',
  -	EVAL_PERL    => 1,
  +    	INCLUDE_PATH => '/usr/local/templates',
  +	    EVAL_PERL    => 1,
       }) || die $Template::ERROR, "\n";
   
   A reference to a new Template object is returned, or undef on error.
  @@ -359,8 +359,8 @@
   
       # reference to output subroutine
       sub myout {
  -	my $output = shift;
  -	...
  +    	my $output = shift;
  +	    ...
       }
       $tt->process('welcome.tt2', $vars, \&myout)
           || die $tt->error(), "\n";
  @@ -403,13 +403,19 @@
       $tt->process($infile, $vars, $outfile, binmode => 1)
           || die $tt->error(), "\n";
   
  +Alternately, the binmode argument can specify a particular IO layer such 
  +as ":utf8".
  +
  +    $tt->process($infile, $vars, $outfile, binmode => ':utf8')
  +        || 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.
   
       my $tt = Template->new({
  -	OUTPUT      => sub { ... },       # default
  -	OUTPUT_PATH => '/tmp',
  +    	OUTPUT      => sub { ... },       # default
  +	    OUTPUT_PATH => '/tmp',
   	...
       }) || die Template->error(), "\n";
   
  @@ -455,10 +461,10 @@
   the formatted error string.
   
       $tt->process('somefile') || do {
  -	my $error = $tt->error();
  -	print "error type: ", $error->type(), "\n";
  -	print "error info: ", $error->info(), "\n";
  -	print $error, "\n";
  +    	my $error = $tt->error();
  +	    print "error type: ", $error->type(), "\n";
  +    	print "error info: ", $error->info(), "\n";
  +	    print $error, "\n";
       };
   
   =head2 service()
  @@ -940,7 +946,7 @@
   
   =head1 VERSION
   
  -Template Toolkit version 2.13, released on 30 January 2004.
  +Template Toolkit version 2.13, released on 04 October 2004.
   
   =head1 COPYRIGHT