Apache-Template

 view release on metacpan or  search on metacpan

lib/Apache/Template.pm  view on Meta::CPAN

within source templates.  A single value can be specified to 
indicate a TAG_STYLE, e.g.

    TT2Tags     html

A pair of values can be used to indicate a START_TAG and END_TAG.

    TT2Tags     <!--    -->

Note that, unlike the Template Toolkit START_TAG and END_TAG
configuration options, these values are automatically escaped to
remove any special meaning within regular expressions.

    TT2Tags     [*  *]  # no need to escape [ or *

By default, the start and end tags are set to C<[%> and C<%]>
respectively.  Thus, directives are embedded in the form: 
[% INCLUDE my/file %].

=item TT2PreChomp

Equivalent to the PRE_CHOMP configuration item.  This flag can be set
to have removed any whitespace preceeding a directive, up to and
including the preceeding newline.  Default is 'Off'.

lib/Template/Service/Apache.pm  view on Meta::CPAN

use Digest::MD5 qw( md5_hex );
use Template::Config;
use Template::Constants;
use Template::Exception;
use Template::Service;

$VERSION = sprintf("%d.%02d", q$Revision: 1.4 $ =~ /(\d+)\.(\d+)/);
$DEBUG   = 0 unless defined $DEBUG;
$CONTENT_TYPE = 'text/html';

use Apache::Util qw( escape_uri ht_time );
use Apache::Constants qw( :common );
use Apache::Request;

#========================================================================
#                     -----  PUBLIC METHODS -----
#========================================================================

#------------------------------------------------------------------------
# template($request)
#

lib/Template/Service/Apache.pm  view on Meta::CPAN


    $params->{ request } = $request
        if $all or $plist->{ request };

    if ($all or $plist->{ uploads }) {
        my @uploads = $request->upload;
        $params->{ uploads } = \@uploads;
    }

    $params->{ cookies } = { 
        map { $1 => escape_uri($2) if (/([^=]+)=(.*)/) }
        grep(!/^$/, split(/;\s*/, $request->header_in('cookie'))),
    } if $all or $plist->{ cookies };
    
    # add any error raised by main template failure
    $params->{ error } = $self->{ TEMPLATE_ERROR };

    return $params;
}




( run in 0.610 second using v1.01-cache-2.11-cpan-c21f80fb71c )