| 1 | package WWW::TypePad::Error; | ||||||||||||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | |||||||||||||||||||||
| 4 | 1 | ▶ | use Any::Moose; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 0 | ▶ | sub throw { | ||||||||||||||||||
|
Subroutine
throw: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 7 | 0 | my( $class, @rest ) = @_; | |||||||||||||||||||
| 8 | 0 | die $class->new( @rest ); | |||||||||||||||||||
| 9 | } | ||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | package WWW::TypePad::Error::HTTP; | ||||||||||||||||||||
| 12 | 1 | ▶ | use Any::Moose; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 13 | 1 | ▶ | use HTTP::Status; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 14 | 1 | extends 'WWW::TypePad::Error'; | |||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | 0 | ▶ | use overload q("") => sub { sprintf "%s (%d)", $_[0]->message, $_[0]->code }, fallback => 1; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.2
Subroutine
__ANON__: not called CC=1 SCAR=0.2
| |||||||||||||||||||||
| 17 | 1 | has code => ( is => 'rw', isa => 'Int' ); | |||||||||||||||||||
| 18 | 1 | has message => ( is => 'rw', isa => 'Str' ); | |||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 0 | ▶ | around BUILDARGS => sub { | ||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||
| 21 | 0 | my $orig = shift; | |||||||||||||||||||
| 22 | 0 | my( $class, $code, $msg ) = @_; | |||||||||||||||||||
| 23 | 0 | ▶ | $msg ||= HTTP::Status::status_message( $code ); | ||||||||||||||||||
|
Condition0%0/3
$msg ||= &HTTP::Status::status_message($code)
MC/DC0%0/2
$msg ||= &HTTP::Status::status_message($code)
$msg
&HTTP::Status::status_message($code)
Truth table0%0/3
A ||= B
A= $msgB= &HTTP::Status::status_message($code)
| |||||||||||||||||||||
| 24 | 0 | $class->$orig( code => $code, message => $msg ); | |||||||||||||||||||
| 25 | 1 | }; | |||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | package WWW::TypePad::Error; | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 1 | 1; | |||||||||||||||||||