Skip to content

Instantly share code, notes, and snippets.

@gunyarakun
Last active December 14, 2015 12:59
Show Gist options
  • Save gunyarakun/5090654 to your computer and use it in GitHub Desktop.
Save gunyarakun/5090654 to your computer and use it in GitHub Desktop.
Mouseをnewしてみた
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;
GFX=HASH(0x79a210)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment