| blib/lib/STF/Dispatcher/PSGI/HTTPException.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 14 | 14 | 100.0 |
| branch | n/a | ||
| condition | 3 | 6 | 50.0 |
| subroutine | 4 | 4 | 100.0 |
| pod | 0 | 2 | 0.0 |
| total | 21 | 26 | 80.7 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package STF::Dispatcher::PSGI::HTTPException; | ||||||
| 2 | 2 | 2 | 22 | use strict; | |||
| 2 | 4 | ||||||
| 2 | 71 | ||||||
| 3 | 2 | 2 | 11 | use Carp (); | |||
| 2 | 5 | ||||||
| 2 | 208 | ||||||
| 4 | |||||||
| 5 | sub throw { | ||||||
| 6 | 2 | 2 | 0 | 7 | my $class = shift; | ||
| 7 | 2 | 110 | Carp::croak( bless [@_], $class ); | ||||
| 8 | } | ||||||
| 9 | |||||||
| 10 | sub as_psgi { | ||||||
| 11 | 2 | 2 | 0 | 119 | my @res = @{$_[0]}; | ||
| 2 | 15 | ||||||
| 12 | 2 | 50 | 8 | $res[0] ||= 500; | |||
| 13 | 2 | 50 | 9 | $res[1] ||= []; | |||
| 14 | 2 | 50 | 7 | $res[2] ||= []; | |||
| 15 | 2 | 26 | return \@res; | ||||
| 16 | } | ||||||
| 17 | |||||||
| 18 | 1; | ||||||
| 19 | |||||||
| 20 | __END__ |