blib/lib/BERT/Time.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 14 | 14 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 6 | 6 | 100.0 |
pod | 2 | 2 | 100.0 |
total | 22 | 22 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package BERT::Time; | ||||||
2 | 6 | 6 | 29 | use strict; | |||
6 | 11 | ||||||
6 | 178 | ||||||
3 | 6 | 6 | 30 | use warnings; | |||
6 | 12 | ||||||
6 | 316 | ||||||
4 | |||||||
5 | 3 | 3 | 231 | use overload '""' => sub { return join('.', $_[0]->value) }, | |||
6 | 6 | 6 | 32 | fallback => 1; | |||
6 | 9 | ||||||
6 | 54 | ||||||
7 | |||||||
8 | sub new { | ||||||
9 | 3 | 3 | 1 | 267 | my ($class, $seconds, $microseconds) = @_; | ||
10 | 3 | 14 | return bless [$seconds, $microseconds], $class; | ||||
11 | } | ||||||
12 | |||||||
13 | sub value { | ||||||
14 | 5 | 5 | 1 | 1660 | return @{ $_[0] }; | ||
5 | 88 | ||||||
15 | } | ||||||
16 | |||||||
17 | 1; | ||||||
18 | |||||||
19 | __END__ |