|
#!/usr/bin/env perl -w
ok( my $t = Text::Template::Simple->new(), 'Got the object' );
my $file = File::Spec->catfile( qw( t data ) , '028-dynamic.tts' );
ok( my $got = $t ->compile( $file ), 'Compile' );
my $expect = 'Dynamic: KLF-->Perl ROCKS!<--MUMULAND' ;
is( $got , $expect , 'Dynamic include got params' );
sub filter_foobar {
my $self = shift ;
my $oref = shift ;
${ $oref } = sprintf '-->%s<--' , ${ $oref };
return ;
}
sub filter_baz {
my $self = shift ;
my $oref = shift ;
${ $oref } = sprintf 'KLF%sMUMULAND' , ${ $oref };
return ;
}
|