File Coverage

blib/lib/Articulate/File.pm
Criterion Covered Total %
statement 12 16 75.0
branch n/a
condition n/a
subroutine 4 6 66.6
pod n/a
total 16 22 72.7


line stmt bran cond sub pod time code
1             package Articulate::File;
2 9     9   44 use strict;
  9         13  
  9         324  
3 9     9   40 use warnings;
  9         16  
  9         228  
4 9     9   43 use Moo;
  9         119  
  9         51  
5 9     9   2655 use overload '""' => sub{shift->_to_string};
  9     0   17  
  9         80  
  0            
6              
7             =head1 NAME
8              
9             Articulate::File - represent a file
10              
11             =cut
12              
13             =head1 METHODS
14              
15             =cut
16              
17             has content_type => (
18             is => 'rw',
19             );
20             has headers => (
21             is => 'rw',
22             );
23             has filename => (
24             is => 'rw',
25             );
26             has io => (
27             is => 'rw',
28             );
29             sub _to_string {
30 0     0     my $self = shift;
31 0           local $/;
32 0           join '', $self->io->getlines;
33             };
34              
35             1;