[Templates-cvs] cvs commit: Template2/docsrc/pod Template.pod

cvs@template-toolkit.org cvs@template-toolkit.org
Thu, 24 Jul 2003 17:16:24 +0100


cvs         03/07/24 16:16:24

  Modified:    docsrc/pod Template.pod
  Log:
  version 2.10
  
  Revision  Changes    Path
  1.29      +18 -3     Template2/docsrc/pod/Template.pod
  
  Index: Template.pod
  ===================================================================
  RCS file: /template-toolkit/Template2/docsrc/pod/Template.pod,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- Template.pod	2003/04/24 09:14:36	1.28
  +++ Template.pod	2003/07/24 16:16:23	1.29
  @@ -88,7 +88,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
  @@ -167,6 +167,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.
  @@ -704,11 +719,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