File Coverage

blib/lib/HTML/Tested/Value/Snippet.pm
Criterion Covered Total %
statement 20 20 100.0
branch 1 2 50.0
condition n/a
subroutine 6 6 100.0
pod 1 1 100.0
total 28 29 96.5


line stmt bran cond sub pod time code
1 1     1   734 use strict;
  1         2  
  1         34  
2 1     1   5 use warnings FATAL => 'all';
  1         2  
  1         40  
3              
4             package HTML::Tested::Value::Snippet;
5 1     1   5 use base 'HTML::Tested::Value';
  1         2  
  1         67  
6 1     1   5 use Carp;
  1         2  
  1         69  
7 1     1   7545 use Template;
  1         34887  
  1         197  
8              
9             sub value_to_string {
10 4     4 1 10 my ($self, $name, $val, $caller, $stash) = @_;
11 4         9 my $res;
12 4         44 my $t = Template->new;
13 4 50       31379 $t->process(\$val, $stash, \$res) or confess "process: " . $t->error;
14 4         44856 return $res;
15             }
16              
17             1;