2
0

inline-comment.t 322 B

1234567891011121314151617
  1. #!perl
  2. #
  3. # Test for comments within an inline code block
  4. use strict;
  5. use warnings;
  6. use Test::More tests => 2;
  7. use_ok 'Text::Template' or exit 1;
  8. my $tmpl = Text::Template->new(
  9. TYPE => 'STRING',
  10. SOURCE => "Hello {\$name#comment}");
  11. my $vars = { name => 'Bob' };
  12. is $tmpl->fill_in(HASH => $vars), 'Hello Bob';