Walmart/Exception.pm

filter: Statementstmt 77.7% 21 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 75.7% 25 / 33 CC 1 SCAR 1.8
CC
1
Cov
78%
as_string
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Walmart.pm ↑ Summary Walmart/Item.pm »
1 package WebService::Walmart::Exception;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 $WebService::Walmart::Exception::VERSION = "0.01";
5  
6 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 with 'Throwable';
8  
9 use overload
10 1 ▶ q{""} => 'as_string',
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 fallback => 1;
12  
13 1 has message => ( is => 'rw', isa => 'Str');
14 1 has method => ( is => 'rw', isa => 'Str');
15 1 has code => ( is => 'rw', isa => 'Int');
16 1 has reason => ( is => 'rw', isa => 'Str');
17 1 has filename => ( is => 'rw', isa => 'Str');
18 1 has linenum => ( is => 'rw', isa => 'Str');
19  
20 0 ▶sub as_string {
Subroutine as_string: not called CC=1 SCAR=6.9
Pod undocumented
21 0 my $self = shift;
22 0 my $message = $self->method.'(): ';
23 0 $message .= $self->message . ' ' . $self->code . ' ' . $self->reason. ' ';
24 0 $message .= 'file: ' . $self->filename .' on line number ' . $self->linenum. ' ';
25 0 $message .= "\n";
26 0 return $message;
27 }
28  
29 1 1;
30 =pod
31  
32  
33 =head1 SYNOPSIS
34  
35 This module represents an exception.
36  
37 You probably shouldn't be calling this directly
38  
39 =cut
« Walmart.pm ↑ Summary Walmart/Item.pm »