blib/lib/Net/API/RPX/Exception/Service.pm

filter: Statementstmt 100% 27 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 33 / 33 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Net/API/RPX/Exception/Network.pm ↑ Summary blib/lib/Net/API/RPX/Exception/Usage.pm »
1 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 package Net::API::RPX::Exception::Service;
3 BEGIN {
4 6 ▶ $Net::API::RPX::Exception::Service::AUTHORITY = 'cpan:KONOBI';
Subroutine BEGIN: called CC=1 SCAR=0.0
5 }
6 {
7 6 $Net::API::RPX::Exception::Service::VERSION = '0.04';
8 }
9  
10 # ABSTRACT: A Class of exceptions for delivering problems from the RPX service.
11  
12 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 6 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 6 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 6 extends 'Net::API::RPX::Exception';
17  
18  
19 6 my $rpx_errors = {
20 -1 => 'Service Temporarily Unavailable',
21 0 => 'Missing parameter',
22 1 => 'Invalid parameter',
23 2 => 'Data not found',
24 3 => 'Authentication error',
25 4 => 'Facebook Error',
26 5 => 'Mapping exists',
27 };
28  
29 6 has 'data' => ( isa => 'Any', is => 'ro', required => 1 );
30 6 has 'status' => ( isa => 'Any', is => 'ro', required => 1 );
31 6 has 'rpx_error' => ( isa => 'Any', is => 'ro', required => 1 );
32 6 has 'rpx_error_code' => ( isa => 'Any', is => 'ro', required => 1 );
33 6 has 'rpx_error_message' => ( isa => 'Any', is => 'ro', required => 1 );
34 6 has
35 'rpx_error_code_description' =>
36 ( isa => 'Any', is => 'ro', required => 1, lazy => 1, ),
37 , builder => '_build_rpx_error_code_description';
38  
39 sub _build_rpx_error_code_description {
40 1 ▶ my ($self) = shift;
Subroutine _build_rpx_error_code_description: called CC=1 SCAR=0.0
41 1 return $rpx_errors->{ $self->rpx_error_code };
42 }
43 6 __PACKAGE__->_immutable();
44 6 1;
45  
46  
47 __END__
48 =pod
49  
50 =head1 NAME
51  
52 Net::API::RPX::Exception::Service - A Class of exceptions for delivering problems from the RPX service.
53  
54 =head1 VERSION
55  
56 version 0.04
57  
58 =head1 NAME
59  
60 =head1 AUTHORS
61  
62 =over 4
63  
64 =item *
65  
66 Scott McWhirter <konobi@cpan.org>
67  
68 =item *
69  
70 Kent Fredric <kentnl@cpan.org>
71  
72 =back
73  
74 =head1 COPYRIGHT AND LICENSE
75  
76 This software is Copyright (c) 2012 by Cloudtone Studios.
77  
78 This is free software, licensed under:
79  
80 The (three-clause) BSD License
81  
82 =cut
83  
« blib/lib/Net/API/RPX/Exception/Network.pm ↑ Summary blib/lib/Net/API/RPX/Exception/Usage.pm »