File Coverage

blib/lib/HTTP/Engine/Middleware/Role.pm
Criterion Covered Total %
statement 3 5 60.0
branch n/a
condition n/a
subroutine 1 2 50.0
pod 0 1 0.0
total 4 8 50.0


line stmt bran cond sub pod time code
1             package HTTP::Engine::Middleware::Role;
2 16     16   6802 use Any::Moose '::Role';
  16         153  
  16         789  
3              
4             has 'before_handles' => (
5             is => 'ro',
6             isa => 'ArrayRef',
7             default => sub { +[] },
8             );
9              
10             has 'after_handles' => (
11             is => 'ro',
12             isa => 'ArrayRef',
13             default => sub { +[] },
14             );
15              
16              
17             has 'logger' => (
18             is => 'rw',
19             isa => 'CodeRef',
20             required => 1,
21             default => sub { sub {} },
22             );
23              
24             sub log {
25 0     0 0   my($self, $level, $msg) = @_;
26 0           $self->logger->( $level => $msg );
27             }
28              
29             1;
30