| 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.902'; | ||||||
| 4 | |||||||
| 5 | 4 | 4 | 1421 | use strict; | |||
| 4 | 18 | ||||||
| 4 | 121 | ||||||
| 6 | 4 | 4 | 20 | use warnings; | |||
| 4 | 8 | ||||||
| 4 | 124 | ||||||
| 7 | 4 | 4 | 22 | use Carp (); | |||
| 4 | 8 | ||||||
| 4 | 69 | ||||||
| 8 | 4 | 4 | 1896 | use parent 'UV::Handle'; | |||
| 4 | 1260 | ||||||
| 4 | 22 | ||||||
| 9 | |||||||
| 10 | sub start { | ||||||
| 11 | 2 | 2 | 1 | 1229 | my $self = shift; | ||
| 12 | 2 | 100 | 14 | if (@_) { | |||
| 13 | 1 | 8 | $self->on('check', shift); | ||||
| 14 | } | ||||||
| 15 | 2 | 6 | my $res; | ||||
| 16 | 2 | 6 | my $err = do { #catch | ||||
| 17 | 2 | 2 | local $@; | ||||
| 18 | 2 | 5 | eval { | ||||
| 19 | 2 | 11 | $res = $self->_start(); | ||||
| 20 | 2 | 4 | 1; | ||||
| 21 | }; #try | ||||||
| 22 | 2 | 6 | $@; | ||||
| 23 | }; | ||||||
| 24 | 2 | 50 | 8 | Carp::croak($err) if $err; # throw | |||
| 25 | 2 | 6 | return $res; | ||||
| 26 | } | ||||||
| 27 | |||||||
| 28 | 1; | ||||||
| 29 | |||||||
| 30 | __END__ |