The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
#!/usr/bin/perl

use strict;
use warnings;
use Test::More tests => 1;
use Template;

my $t = <<EOT;
[%-
    USE Num2Word;
    foobar.to_word
-%]
EOT

my $template = Template->new;
my $out = "";
$template->process(\$t, { foobar => 1 }, \$out)
    or die $template->error();

is($out, "one")