| blib/lib/UV/Check.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 24 | 24 | 100.0 |
| branch | 3 | 4 | 75.0 |
| condition | n/a | ||
| subroutine | 5 | 5 | 100.0 |
| pod | 1 | 1 | 100.0 |
| total | 33 | 34 | 97.0 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package UV::Check; | ||||||
| 2 | |||||||
| 3 | our $VERSION = '1.900'; | ||||||
| 4 | |||||||
| 5 | 4 | 4 | 1415 | use strict; | |||
| 4 | 14 | ||||||
| 4 | 129 | ||||||
| 6 | 4 | 4 | 21 | use warnings; | |||
| 4 | 7 | ||||||
| 4 | 94 | ||||||
| 7 | 4 | 4 | 19 | use Carp (); | |||
| 4 | 6 | ||||||
| 4 | 62 | ||||||
| 8 | 4 | 4 | 1896 | use parent 'UV::Handle'; | |||
| 4 | 1287 | ||||||
| 4 | 21 | ||||||
| 9 | |||||||
| 10 | sub start { | ||||||
| 11 | 2 | 2 | 1 | 1031 | my $self = shift; | ||
| 12 | 2 | 100 | 13 | if (@_) { | |||
| 13 | 1 | 8 | $self->on('check', shift); | ||||
| 14 | } | ||||||
| 15 | 2 | 5 | my $res; | ||||
| 16 | 2 | 5 | my $err = do { #catch | ||||
| 17 | 2 | 4 | local $@; | ||||
| 18 | 2 | 4 | eval { | ||||
| 19 | 2 | 11 | $res = $self->_start(); | ||||
| 20 | 2 | 4 | 1; | ||||
| 21 | }; #try | ||||||
| 22 | 2 | 6 | $@; | ||||
| 23 | }; | ||||||
| 24 | 2 | 50 | 7 | Carp::croak($err) if $err; # throw | |||
| 25 | 2 | 5 | return $res; | ||||
| 26 | } | ||||||
| 27 | |||||||
| 28 | 1; | ||||||
| 29 | |||||||
| 30 | __END__ |