| blib/lib/Sort/Key/Register.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % | 
| statement | 13 | 14 | 92.8 | 
| branch | 1 | 2 | 50.0 | 
| condition | n/a | ||
| subroutine | 4 | 4 | 100.0 | 
| pod | n/a | ||
| total | 18 | 20 | 90.0 | 
| line | stmt | bran | cond | sub | pod | time | code | 
|---|---|---|---|---|---|---|---|
| 1 | package Sort::Key::Register; | ||||||
| 2 | |||||||
| 3 | our $VERSION = '1.30'; | ||||||
| 4 | |||||||
| 5 | 2 | 2 | 613 | use warnings; | |||
| 2 | 3 | ||||||
| 2 | 85 | ||||||
| 6 | 2 | 2 | 11 | use strict; | |||
| 2 | 4 | ||||||
| 2 | 69 | ||||||
| 7 | |||||||
| 8 | 2 | 2 | 12 | use Sort::Key; | |||
| 2 | 4 | ||||||
| 2 | 449 | ||||||
| 9 | |||||||
| 10 | sub import { | ||||||
| 11 | 7 | 7 | 38 | my $class = shift; | |||
| 12 | 7 | 11 | my $name = shift; | ||||
| 13 | 7 | 50 | 21 | if (@_ == 1) { | |||
| 14 | 0 | 0 | Sort::Key::Types::register_type($name, undef, @_); | ||||
| 15 | } | ||||||
| 16 | else { | ||||||
| 17 | 7 | 30 | Sort::Key::Types::register_type($name, @_); | ||||
| 18 | } | ||||||
| 19 | } | ||||||
| 20 | |||||||
| 21 | 1; | ||||||
| 22 | __END__ |