blib/lib/BackPAN/Index/Role/Log.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 5 | 6 | 83.3 |
branch | 1 | 2 | 50.0 |
condition | n/a | ||
subroutine | 2 | 2 | 100.0 |
pod | n/a | ||
total | 8 | 10 | 80.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package BackPAN::Index::Role::Log; | ||||||
2 | |||||||
3 | 13 | 13 | 6701878 | use Mouse::Role; | |||
13 | 47894 | ||||||
13 | 113 | ||||||
4 | |||||||
5 | has debug => | ||||||
6 | is => 'ro', | ||||||
7 | isa => 'Bool', | ||||||
8 | default => 0; | ||||||
9 | |||||||
10 | sub _log { | ||||||
11 | 7 | 7 | 27 | my $self = shift; | |||
12 | 7 | 50 | 152 | return unless $self->debug; | |||
13 | 0 | print STDERR @_, "\n"; | |||||
14 | } | ||||||
15 | |||||||
16 | 1; |