Clear.

And what is the Right Thing in this case? Currently I make such things
with overriding of corresponding filters and vmethods and think about
sub-classing Template with locale support. Is this is the only way and
is it good?

On 7/21/05, Eric Cholet <[EMAIL PROTECTED]> wrote:
> Le 21 juil. 05 à 07:30, Igor Lobanov a écrit :
> 
> > Hello
> >
> > What do you think about usage of locale pragma in 2 TT core
> > distribution modules: Template::Stash and Template::Filters ?
> >
> > This would allow to use locale-dependent vmethods and filters
> > (sort, upper, match, etc) with non-latin1 locales.
> >
> > =Patch for Stash.pm
> >
> > *** Stash.pm.orig       Thu Jul 21 11:04:34 2005
> > --- Stash.pm    Thu Jul 21 10:50:07 2005
> > *************** package Template::Stash;
> > *** 27,32 ****
> > --- 27,33 ----
> >  require 5.004;
> >
> >  use strict;
> > + use locale;
> >  use vars qw( $VERSION $DEBUG $ROOT_OPS $SCALAR_OPS $HASH_OPS
> > $LIST_OPS );
> >
> >  $VERSION = sprintf("%d.%02d", q$Revision: 2.86 $ =~ /(\d+)\.(\d+)/);
> >
> > =Patch for Filters.pm
> >
> > *** Filters.pm.orig     Thu Jul 21 11:07:16 2005
> > --- Filters.pm  Thu Jul 21 10:49:49 2005
> > *************** package Template::Filters;
> > *** 27,32 ****
> > --- 27,33 ----
> >  require 5.004;
> >
> >  use strict;
> > + use locale;
> >  use base qw( Template::Base );
> >  use vars qw( $VERSION $DEBUG $FILTERS $URI_ESCAPES $PLUGIN_FILTER );
> >  use Template::Constants;
> 
> 
> Please don't do this. All locale effects are implicit in Perl. This will
> cause a lot of grief. If I may quote Jarkko:
> 
>      I can let you in to the ultimate locale secret:
> 
>               Avoid.
>                  -- Jarkko Hietaniemi
> 
> --
> Eric Cholet
> 
> 
> 
> _______________________________________________
> templates mailing list
> [email protected]
> http://lists.template-toolkit.org/mailman/listinfo/templates
> 


-- 
Best regards,
Lobanov Igor
[EMAIL PROTECTED]

http://www.template-toolkit.ru - Template Toolkit translations to Russian

_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to