Business/CyberSource/Exception/Response.pm

filter: Statementstmt 96.3% 26 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod n/a totaltotal 94.2% 33 / 35 CC 1 SCAR 1.2
CC
1
Cov
96%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« Business/CyberSource/Exception/SOAPFault.pm ↑ Summary Business/CyberSource/Factory/Request.pm »
1 package Business::CyberSource::Exception::Response;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $VERSION = '0.010007'; # VERSION
7  
8 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 2 ▶use MooseX::Aliases;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 2 extends 'Business::CyberSource::Exception';
12 2 with 'Business::CyberSource::Response::Role::Base',
13 'Business::CyberSource::Role::Traceable' => {
14 -excludes => [qw( trace )]
15 };
16  
17 sub _build_message {
18 1 ▶ my $self = shift;
Subroutine _build_message: called CC=1 SCAR=0.0
19 1 return $self->decision . ' ' . $self->reason_text;
20 }
21  
22 has '+value' => (
23 0 ▶ default => sub { return $_[0]->reason_code },
Subroutine __ANON__: not called CC=1 SCAR=6.9
24 2 );
25  
26 2 __PACKAGE__->meta->make_immutable;
27 2 1;
28 # ABSTRACT: response thrown as an object because of ERROR state
29  
30 __END__
31  
32 =pod
33  
34 =encoding UTF-8
35  
36 =head1 NAME
37  
38 Business::CyberSource::Exception::Response - response thrown as an object because of ERROR state
39  
40 =head1 VERSION
41  
42 version 0.010007
43  
44 =head1 SYNOPSIS
45  
46 use Try::Tiny;
47 use Safe::Isa;
48  
49 try { ... }
50 catch {
51 if ( $_->$_does('Business::CyberSource::Response::Role::Base) )
52 # log reason_text
53 }
54 };
55  
56 =head1 DESCRIPTION
57  
58 do not catch this object, should Moose provide an exception role at some
59 point, we will remove this class in favor of applying the role to
60 L<Business::CyberSource::Response> instead catch
61 L<Business::CyberSource::Response::Role::Base>
62  
63 =head1 BUGS
64  
65 Please report any bugs or feature requests on the bugtracker website
66 https://github.com/xenoterracide/business-cybersource/issues
67  
68 When submitting a bug or request, please include a test-file or a
69 patch to an existing test-file that illustrates the bug or desired
70 feature.
71  
72 =head1 AUTHOR
73  
74 Caleb Cushing <xenoterracide@gmail.com>
75  
76 =head1 COPYRIGHT AND LICENSE
77  
78 This software is Copyright (c) 2016 by Caleb Cushing <xenoterracide@gmail.com>.
79  
80 This is free software, licensed under:
81  
82 The Artistic License 2.0 (GPL Compatible)
83  
84 =cut
« Business/CyberSource/Exception/SOAPFault.pm ↑ Summary Business/CyberSource/Factory/Request.pm »