Skip to content

Instantly share code, notes, and snippets.

@hkoba
Last active August 29, 2015 14:04
Show Gist options
  • Save hkoba/5183295fb9260415dc47 to your computer and use it in GitHub Desktop.
Save hkoba/5183295fb9260415dc47 to your computer and use it in GitHub Desktop.
dev-embedded test
#!/usr/bin/env perl
use Mojolicious::Lite;
use YATT::Lite::Embed;
foreach my $name ($YATT->list_public_items) {
get "/$name" => sub {
my ($self) = @_;
# $self->render(text => 'Hello!');
$self->render(text => $YATT->render($name));
};
}
app->start;
__DATA__
<!yatt:args user>
<h2>Hello! &yatt:user;</h2>
<!yatt:page foo user>
This is foo, &yatt:user;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment