Last active
December 14, 2015 12:59
-
-
Save gunyarakun/5090654 to your computer and use it in GitHub Desktop.
Mouseをnewしてみた
This file contains 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 Data::Dumper; | |
use Text::Xslate; | |
my $tx = Text::Xslate->new({ | |
syntax => 'TTerse', | |
function => { | |
gfx => sub { | |
GFX->new(); | |
}, | |
}, | |
}); | |
my $template = <<TMPL; | |
[% gfx() %] | |
TMPL | |
my $ret = $tx->render_string($template); | |
print $ret; | |
package GFX; | |
use Mouse; |
This file contains 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
GFX=HASH(0x79a210) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment