File Coverage

blib/lib/Any/Renderer/Data/Printer.pm
Criterion Covered Total %
statement 13 14 92.8
branch 1 2 50.0
condition n/a
subroutine 5 6 83.3
pod 0 4 0.0
total 19 26 73.0


line stmt bran cond sub pod time code
1             package Any::Renderer::Data::Printer;
2 2     2   44488 use strict;
  2         6  
  2         72  
3              
4 2     2   2182 use Data::Printer alias => '_dp_printer';
  2         78618  
  2         21  
5              
6             our $VERSION = '0.04';
7              
8              
9             sub new {
10 2     2 0 8642 my ( $class, $format, $options ) = @_;
11 2 50       9 die("Invalid format $format") unless($format eq 'Data::Printer');
12 2         11 return bless({options=>$options}, $class);
13             }
14              
15              
16             sub render {
17 2     2 0 9 my ( $self, $data ) = @_;
18 2         4 return _dp_printer($data, %{$self->{options}});
  2         13  
19             }
20              
21              
22             sub available_formats {
23 1     1 0 27 return [ 'Data::Printer' ];
24             }
25              
26              
27 0     0 0   sub requires_template {0};
28              
29             1; # End of Any::Renderer::Data::Printer
30              
31             __END__