| blib/lib/Raisin/Logger.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % | 
| statement | 9 | 9 | 100.0 | 
| branch | n/a | ||
| condition | n/a | ||
| subroutine | 4 | 4 | 100.0 | 
| pod | 1 | 2 | 50.0 | 
| total | 14 | 15 | 93.3 | 
| line | stmt | bran | cond | sub | pod | time | code | 
|---|---|---|---|---|---|---|---|
| 1 | #!perl | ||||||
| 2 | #PODNAME: Raisin::Logger | ||||||
| 3 | #ABSTRACT: Default logger for Raisin. | ||||||
| 4 | |||||||
| 5 | 7 | 7 | 58666 | use strict; | |||
| 7 | 23 | ||||||
| 7 | 188 | ||||||
| 6 | 7 | 7 | 29 | use warnings; | |||
| 7 | 9 | ||||||
| 7 | 781 | ||||||
| 7 | |||||||
| 8 | package Raisin::Logger; | ||||||
| 9 | $Raisin::Logger::VERSION = '0.94'; | ||||||
| 10 | my $FH = *STDERR; | ||||||
| 11 | |||||||
| 12 | 7 | 7 | 0 | 1012 | sub new { bless {}, shift } | ||
| 13 | |||||||
| 14 | sub log { | ||||||
| 15 | 4 | 4 | 1 | 2190 | my ($self, %args) = @_; | ||
| 16 | 4 | 51 | printf $FH '%s %s', uc($args{level}), $args{message}; | ||||
| 17 | } | ||||||
| 18 | |||||||
| 19 | 1; | ||||||
| 20 | |||||||
| 21 | __END__ |