Skip to content

Instantly share code, notes, and snippets.

Created March 6, 2016 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/3a33cbed156ebef93923 to your computer and use it in GitHub Desktop.
Save anonymous/3a33cbed156ebef93923 to your computer and use it in GitHub Desktop.
$ MOJO_TEMPLATE_DEBUG=1 perl -Ilib -Mojo -E 'my $c = app->build_controller; n { $c->render_to_string(inline => q{test <%= $foo %><%= $bar %><%= $baz %> 123}, foo => 23, bar => 24, baz => 25) } 10000'
-- Code for inline template "64cbd0c69fb62aaf9657e418967f9863"
#line 1 "inline template 64cbd0c69fb62aaf9657e418967f9863"
package Mojo::Template::Sandbox::0da6abe5708ed339e77c5f33be5b9598;use Mojo::Base -strict; no warnings 'ambiguous';sub { my $_O = ''; my $self = my $c = _C;;{ my ($bar,$baz,$foo)= @{shift()}{qw(bar baz foo)}; { $_O .= "test\ ";$_O .= _escape scalar + $foo ;$_O .= _escape scalar + $bar ;$_O .= _escape scalar + $baz ;$_O .= "\ 123\n";
#line 1 "inline template 64cbd0c69fb62aaf9657e418967f9863"
;}; } $_O };
0.69463 wallclock secs ( 0.69 usr + 0.01 sys = 0.70 CPU) @ 14285.71/s (n=10000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment