blib/lib/Salvation/TC/Type/Defined.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 12 | 14 | 85.7 |
branch | 0 | 2 | 0.0 |
condition | n/a | ||
subroutine | 4 | 5 | 80.0 |
pod | 1 | 1 | 100.0 |
total | 17 | 22 | 77.2 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Salvation::TC::Type::Defined; | ||||||
2 | |||||||
3 | 4 | 4 | 1361 | use strict; | |||
4 | 4 | ||||||
4 | 104 | ||||||
4 | 4 | 4 | 14 | use warnings; | |||
4 | 5 | ||||||
4 | 101 | ||||||
5 | |||||||
6 | 4 | 4 | 14 | use base 'Salvation::TC::Type'; | |||
4 | 2 | ||||||
4 | 221 | ||||||
7 | |||||||
8 | 4 | 4 | 14 | use Salvation::TC::Exception::WrongType (); | |||
4 | 5 | ||||||
4 | 192 | ||||||
9 | |||||||
10 | |||||||
11 | sub Check { | ||||||
12 | |||||||
13 | 0 | 0 | 1 | my ( $class, $value ) = @_; | |||
14 | |||||||
15 | 0 | 0 | ( defined $value ) || Salvation::TC::Exception::WrongType -> throw( 'type' => 'Defined', 'value' => $value ); | ||||
16 | } | ||||||
17 | |||||||
18 | |||||||
19 | 1; | ||||||
20 | |||||||
21 | __END__ |