File Coverage

blib/lib/Test/Reporter/Transport/File.pm
Criterion Covered Total %
statement 15 15 100.0
branch 2 4 50.0
condition 1 3 33.3
subroutine 5 5 100.0
pod 2 2 100.0
total 25 29 86.2


line stmt bran cond sub pod time code
1 2     2   9 use strict;
  2         2  
  2         141  
2 2 50   2   12 BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } }
  2         10  
  2         126  
3             package Test::Reporter::Transport::File;
4              
5             our $VERSION = '1.62';
6              
7 2     2   8 use base 'Test::Reporter::Transport';
  2         3  
  2         488  
8              
9             sub new {
10 1     1 1 5 my ($class, $dir) = @_;
11              
12 1 50 33     46 die "target directory '$dir' doesn't exist or can't be written to"
13             unless -d $dir && -w $dir;
14              
15 1         6 return bless { dir => $dir } => $class;
16             }
17              
18             sub send {
19 1     1 1 2 my ($self, $report) = @_;
20 1         17 $report->dir( $self->{dir} );
21 1         4 return $report->write();
22             }
23              
24             1;
25              
26             # ABSTRACT: File transport for Test::Reporter
27              
28             __END__