Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • a0723b2
  • /
  • external
  • /
  • perl
  • /
  • Text-Template-1.56
  • /
  • t
  • /
  • rt29928.t
Raw File
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:b50d53ad428fb02c7fed41437c24d565c507433d
directory badge Iframe embedding
swh:1:dir:7f3413dd469356106299d911badbf763182377dc
rt29928.t
#!perl
#
# Test for RT Bug 29928 fix
# https://rt.cpan.org/Public/Bug/Display.html?id=29928

use strict;
use warnings;
use Test::More tests => 2;

use_ok 'Text::Template::Preprocess' or exit 1;

my $tin = q{The value of $foo is: {$foo}.};

sub tester {
    1;    # dummy preprocessor to cause the bug described.
}

my $tmpl1 = Text::Template::Preprocess->new(TYPE => 'STRING', SOURCE => $tin);

$tmpl1->compile;

my $t1 = $tmpl1->fill_in(
    HASH         => { foo => 'things' },
    PREPROCESSOR => \&tester);

is $t1, 'The value of $foo is: things.';

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top