blib/lib/Salvation/TC/Type/CodeRef.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 14 | 14 | 100.0 |
branch | 2 | 2 | 100.0 |
condition | n/a | ||
subroutine | 5 | 5 | 100.0 |
pod | 1 | 1 | 100.0 |
total | 22 | 22 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Salvation::TC::Type::CodeRef; | ||||||
2 | |||||||
3 | 4 | 4 | 1307 | use strict; | |||
4 | 5 | ||||||
4 | 101 | ||||||
4 | 4 | 4 | 15 | use warnings; | |||
4 | 5 | ||||||
4 | 82 | ||||||
5 | |||||||
6 | 4 | 4 | 12 | use base 'Salvation::TC::Type::Ref'; | |||
4 | 4 | ||||||
4 | 259 | ||||||
7 | |||||||
8 | 4 | 4 | 16 | use Salvation::TC::Exception::WrongType (); | |||
4 | 4 | ||||||
4 | 205 | ||||||
9 | |||||||
10 | |||||||
11 | sub Check { | ||||||
12 | |||||||
13 | 8 | 8 | 1 | 11 | my ( $class, $value ) = @_; | ||
14 | |||||||
15 | 8 | 100 | 38 | ( ref( $value ) eq 'CODE' ) || Salvation::TC::Exception::WrongType -> throw( 'type' => 'CodeRef', 'value' => $value ); | |||
16 | } | ||||||
17 | |||||||
18 | 1; | ||||||
19 | |||||||
20 | __END__ |