blib/lib/Sub/Spy/Call.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 12 | 12 | 100.0 |
branch | 1 | 2 | 50.0 |
condition | n/a | ||
subroutine | 5 | 5 | 100.0 |
pod | 1 | 2 | 50.0 |
total | 19 | 21 | 90.4 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Sub::Spy::Call; | ||||||
2 | 5 | 5 | 24 | use strict; | |||
5 | 9 | ||||||
5 | 162 | ||||||
3 | 5 | 5 | 24 | use warnings; | |||
5 | 7 | ||||||
5 | 159 | ||||||
4 | |||||||
5 | 5 | 5 | 25 | use parent qw/Class::Accessor::Fast/; | |||
5 | 21 | ||||||
5 | 29 | ||||||
6 | |||||||
7 | __PACKAGE__->mk_ro_accessors(qw/args exception return_value/); | ||||||
8 | |||||||
9 | sub new { | ||||||
10 | 10 | 10 | 1 | 1425 | my ($class, $param) = @_; | ||
11 | 10 | 81 | return $class->SUPER::new($param); | ||||
12 | } | ||||||
13 | |||||||
14 | # exception | ||||||
15 | |||||||
16 | sub threw { | ||||||
17 | 1 | 50 | 1 | 0 | 2004 | return (defined shift->exception) ? 1 : 0; | |
18 | } | ||||||
19 | |||||||
20 | |||||||
21 | 1; |