Skip to content

Instantly share code, notes, and snippets.

@und3f
Created September 9, 2011 15:01
Show Gist options
  • Save und3f/1206455 to your computer and use it in GitHub Desktop.
Save und3f/1206455 to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use v5.10;
use Text::Caml;
use URI::Escape;
my $renderer = Text::Caml->new;
my $output;
$output = $renderer->render(
<<'EOF', {uri_escape => sub { uri_escape $_[1] }, uris => ['test']});
{{#uris}}{{#uri_escape}}{{.}}{{/uri_escape}}{{/uris}}
EOF
say uri_unescape($output);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment