>>>>> "AW" == Andy Wardley <[EMAIL PROTECTED]> writes:
AW> Sam Wong wrote:
>> Another work around I have found working so far is to include...
>> [% RAWPERL %]
>> use utf-8;
>> [% END %]
>> ...at the head of EVERY templates...
AW> You could subclass Template::Directive to have a modified version
AW> of the template() subroutine which adds it for you automatically.
AW> Then use the FACTORY config option to tell TT to use your new
AW> directives factory module.
AW> See t/factory.t for an example of subclassing T::D.
I think in long run the most elegant solution would be adding IO
layer's support to T::Provider. Imaging being able to write
my $template = Template->new({
INCLUDE_PATH => [ '/templates/dir1:utf8',
'/templates/dir2:encoding(koi8-r)',
'/templates/dir3:gzip:utf8' ]
});
(here after first ':' comes list of IO layers which T::Provider
uses when opening templates).
--
Ilya Martynov, [EMAIL PROTECTED]
CTO IPonWEB (UK) Ltd
Quality Perl Programming and Unix Support
UK managed @ offshore prices - http://www.iponweb.net
Personal website - http://martynov.org
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates