File Coverage

blib/lib/Plack/Middleware/Static/Range.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition 3 5 60.0
subroutine 6 6 100.0
pod n/a
total 27 29 93.1


line stmt bran cond sub pod time code
1             package Plack::Middleware::Static::Range;
2 1     1   1128 use 5.008001;
  1         4  
  1         63  
3 1     1   6 use strict;
  1         2  
  1         36  
4 1     1   17 use warnings;
  1         2  
  1         41  
5 1     1   657 use Plack::App::File::Range;
  1         3  
  1         29  
6 1     1   9 use parent 'Plack::Middleware::Static';
  1         2  
  1         7  
7             our $VERSION = '0.01';
8              
9             sub _handle_static {
10 10     10   61848 my ($self, $env) = @_;
11 10   50     193 $self->{file} ||= Plack::App::File::Range->new({
      66        
12             root => $self->root || '.',
13             encoding => $self->encoding,
14             });
15 10         232 $self->SUPER::_handle_static($env);
16             }
17              
18             1;
19              
20             __END__