Template::Stash::ForceUTF8(3pm)

Template::Stash::ForceUTF83pm

Force utf-8 (unicode) flag on stash variables

Usage

  use Template::Stash::ForceUTF8;
  use Template;
  my $tt = Template->new(
      LOAD_TEMPLATES => [ Template::Provider::Encoding->new ],
      STASH => Template::Stash::ForceUTF8->new,
  );
  my $vars;
  $vars->{foo} = "\x{5bae}\x{5ddd}";         # Unicode flagged
  $vars->{bar} = "\xe5\xae\xae\xe5\xb7\x9d"; # UTF-8 bytes
  $tt->process($template, $vars); # this DWIMs

Overview

Template::Stash::ForceUTF8 is a Template::Stash that forces Unicode flag on stash variables. Best used with Template::Provider::Encoding.

Releases

9 releases since Debian 5.0 (Lenny); the text changed 3 times.

  1. 5.0–6.0
  2. 7–9
  3. 10–11
  4. 12–13

From libtemplate-provider-encoding-perl 0.10-4 in Debian 13 (Trixie). Parsed by carta from the page's man source.