File Coverage

blib/lib/HTTP/Engine/Middleware/Role/Logger.pm
Criterion Covered Total %
statement 5 5 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod 0 1 0.0
total 7 8 87.5


line stmt bran cond sub pod time code
1             package HTTP::Engine::Middleware::Role::Logger;
2 3     3   1165 use Any::Moose '::Role';
  3         6  
  3         13  
3              
4             has 'logger' => (
5             is => 'rw',
6             isa => 'CodeRef',
7             required => 1,
8             default => sub { sub {} },
9             );
10              
11             sub log {
12 9     9 0 29 my ($self, $msg) = @_;
13 9         31 $self->logger->( $msg );
14             }
15              
16             1;
17