@@ -, +, @@ --- C4/TTParser.pm | 1 + xt/tt_valid.t | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) --- a/C4/TTParser.pm +++ a/C4/TTParser.pm @@ -40,6 +40,7 @@ sub next_token{ #unshift token back on @tokens sub unshift_token{ + my $self = shift; unshift @tokens, shift; } --- a/xt/tt_valid.t +++ a/xt/tt_valid.t @@ -57,7 +57,8 @@ ok( !@files_with_directive_in_tag, "TT syntax: not using TT directive within HTM ); my $testtoken = 0; -C4::TTParser::unshift_token($testtoken); +my $ttparser = C4::TTParser->new(); +$ttparser->unshift_token($testtoken); my $testtokenagain = C4::TTParser::next_token(); is( $testtoken, $testtokenagain, "Token received same as original put on stack"); --