Created
September 9, 2011 15:01
-
-
Save und3f/1206455 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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