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

filter: Statementstmt 100% 31 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 100% 38 / 38 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/Net/API/RPX/Exception/Network.pm ↑ Summary lib/Net/API/RPX/Exception/Usage.pm »
1 4 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package Net::API::RPX::Exception::Service;
6  
7 # ABSTRACT: A Class of exceptions for delivering problems from the RPX service.
8  
9 4 our $VERSION = '1.000000';
10  
11 4 our $AUTHORITY = 'cpan:KONOBI'; # AUTHORITY
12  
13 4 ▶use Moose qw( has extends );
Subroutine BEGIN: called CC=1 SCAR=0.0
14 4 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 4 extends 'Net::API::RPX::Exception';
17  
18 4 my $rpx_errors = {
19 -1 => 'Service Temporarily Unavailable',
20 0 => 'Missing parameter',
21 1 => 'Invalid parameter',
22 2 => 'Data not found',
23 3 => 'Authentication error',
24 4 => 'Facebook Error',
25 5 => 'Mapping exists',
26 };
27  
28 4 has 'data' => ( isa => 'Any', is => 'ro', required => 1 );
29 4 has 'status' => ( isa => 'Any', is => 'ro', required => 1 );
30 4 has 'rpx_error' => ( isa => 'Any', is => 'ro', required => 1 );
31 4 has 'rpx_error_code' => ( isa => 'Any', is => 'ro', required => 1 );
32 4 has 'rpx_error_message' => ( isa => 'Any', is => 'ro', required => 1 );
33 4 has
34 'rpx_error_code_description' => ( isa => 'Any', is => 'ro', required => 1, lazy => 1, ),
35 , builder => '_build_rpx_error_code_description';
36  
37 4 __PACKAGE__->meta->make_immutable( inline_constructor => 0 );
38 4 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
39  
40 sub _build_rpx_error_code_description {
41 1 ▶ my ($self) = shift;
Subroutine _build_rpx_error_code_description: called CC=1 SCAR=0.0
42 1 return $rpx_errors->{ $self->rpx_error_code };
43 }
44 4 1;
45  
46 __END__
47  
48 =pod
49  
50 =encoding UTF-8
51  
52 =head1 NAME
53  
54 Net::API::RPX::Exception::Service - A Class of exceptions for delivering problems from the RPX service.
55  
56 =head1 VERSION
57  
58 version 1.000000
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) 2015 by Cloudtone Studios.
77  
78 This is free software, licensed under:
79  
80 The (three-clause) BSD License
81  
82 =cut
« lib/Net/API/RPX/Exception/Network.pm ↑ Summary lib/Net/API/RPX/Exception/Usage.pm »