+ HT_mem => sub {
+ my $ht = HTML::Template->new(type => 'filename', source => "foo.ht", path => \@dirs, cache => 1);
+ $ht->param($stash_ht);
+ $ht->param($form);
+ my $out = $ht->output;
+ },
+ HT_compile => sub {
+ my $ht = HTML::Template->new(type => 'filename', source => "foo.ht", file_cache => 1, path => \@dirs, file_cache_dir => $dir2);
+ $ht->param($stash_ht);
+ $ht->param($form);
+ my $out = $ht->output;
+ },
+
+ HTE_str => sub {
+ my $ht = HTML::Template::Expr->new(type => 'scalarref', source => \$content_ht);
+ $ht->param($stash_ht);
+ $ht->param($form);
+ my $out = $ht->output;
+ },
+ HTE_mem => sub {
+ my $ht = HTML::Template::Expr->new(type => 'filename', source => "foo.ht", path => \@dirs, cache => 1);
+ $ht->param($stash_ht);
+ $ht->param($form);
+ my $out = $ht->output;
+ },
+
+ HTJ_compile => sub {
+ my $ht = HTML::Template::JIT->new(filename => "foo.ht", path => \@dirs, jit_path => $dir2);
+ $ht->param($stash_ht);
+ $ht->param($form);
+ my $out = $ht->output;
+ },
+};
+
+
+my %mem_tests = map {($_ => $tests->{$_})} qw(TT_mem TTX_mem CET_mem HT_mem HTE_mem CTX_mem);
+my %cpl_tests = map {($_ => $tests->{$_})} qw(TT_compile TTX_compile CET_compile HT_compile HTJ_compile CTX_compile);
+my %str_tests = map {($_ => $tests->{$_})} qw(TT_str TTX_str CET_str HT_str HTE_str TextTemplate CTX_str);
+
+print "------------------------------------------------------------------------\n";
+print "From a string or scalarref tests\n";
+cmpthese timethese (-2, \%str_tests);
+
+print "------------------------------------------------------------------------\n";
+print "Compiled and cached on the file system tests\n";
+cmpthese timethese (-2, \%cpl_tests);
+
+print "------------------------------------------------------------------------\n";
+print "Cached in memory tests\n";
+cmpthese timethese (-2, \%mem_tests);
+
+print "------------------------------------------------------------------------\n";
+print "All variants together\n";
+cmpthese timethese (-2, $tests);