Skip to content

Instantly share code, notes, and snippets.

@ryochin
Created November 17, 2011 05:38
Show Gist options
  • Save ryochin/1372456 to your computer and use it in GitHub Desktop.
Save ryochin/1372456 to your computer and use it in GitHub Desktop.
'switch' with TTerse bug
#!/usr/bin/perl --
use strict;
use Text::Xslate;
my $xs = Text::Xslate->new(
syntax => 'TTerse',
);
my $template = <<'END';
[% switch.foo %]
<: $switch.foo :>
END
my $var = {
switch => {
foo => "hello",
},
};
print $xs->render_string( $template, $var );
__END__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment