TypePad/Error.pm

filter: Statementstmt 74.0% 20 / 27 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 62.5% 5 / 8 Podpod 0.0% 0 / 1 totaltotal 60.9% 25 / 41 CC 2 SCAR 8.0
CC
2
Cov
67%
__ANON__
6.0
throw
2.0
BEGIN
1.0
CRAP 2.2
« TypePad/CodeGen.pm ↑ Summary TypePad/Badges.pm »
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)
l!l&&r!l&&!r
000
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)
ABresult
1X1
011
000
24 0 $class->$orig( code => $code, message => $msg );
25 1 };
26  
27 package WWW::TypePad::Error;
28  
29 1 1;
« TypePad/CodeGen.pm ↑ Summary TypePad/Badges.pm »