| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
4
|
|
|
4
|
|
534
|
use 5.006; |
|
|
4
|
|
|
|
|
11
|
|
|
2
|
4
|
|
|
4
|
|
18
|
use strict; |
|
|
4
|
|
|
|
|
9
|
|
|
|
4
|
|
|
|
|
127
|
|
|
3
|
4
|
|
|
4
|
|
20
|
use warnings; |
|
|
4
|
|
|
|
|
7
|
|
|
|
4
|
|
|
|
|
295
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Net::API::RPX::Exception::Usage; |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: For when the interface is used wrongly |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '1.000001'; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KONOBI'; # AUTHORITY |
|
12
|
|
|
|
|
|
|
|
|
13
|
4
|
|
|
4
|
|
447
|
use Moose qw( has extends around ); |
|
|
4
|
|
|
|
|
372754
|
|
|
|
4
|
|
|
|
|
35
|
|
|
14
|
4
|
|
|
4
|
|
22824
|
use namespace::autoclean; |
|
|
4
|
|
|
|
|
31692
|
|
|
|
4
|
|
|
|
|
17
|
|
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
extends 'Net::API::RPX::Exception'; |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has 'required_parameter' => ( isa => 'Str', is => 'rw', required => 1 ); |
|
19
|
|
|
|
|
|
|
has 'method_name' => ( isa => 'Str', is => 'rw', required => 1 ); |
|
20
|
|
|
|
|
|
|
has 'signature' => ( isa => 'Str', is => 'rw', required => 1 ); |
|
21
|
|
|
|
|
|
|
has 'package' => ( isa => 'Str', is => 'rw', required => 1 ); |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub _signature_string { |
|
24
|
12
|
|
|
12
|
|
20
|
my ($self) = @_; |
|
25
|
12
|
|
|
|
|
365
|
return $self->method_name . '(' . $self->signature . ')'; |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub _explanation { |
|
29
|
12
|
|
|
12
|
|
14095
|
my ($self) = @_; |
|
30
|
12
|
|
|
|
|
454
|
return sprintf q{Method %s on package %s expects the parameter "%s"} . qq{\n\n} . qq{\tUsage:\t%s\n}, $self->method_name, |
|
31
|
|
|
|
|
|
|
$self->package, |
|
32
|
|
|
|
|
|
|
$self->required_parameter, $self->_signature_string; |
|
33
|
|
|
|
|
|
|
} |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
around message => sub { |
|
36
|
|
|
|
|
|
|
my ( $orig, $self, @args ) = @_; |
|
37
|
|
|
|
|
|
|
return $self->$orig(@args) . qq{\n} . $self->_explanation; |
|
38
|
|
|
|
|
|
|
}; |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable( inline_constructor => 0 ); |
|
41
|
|
|
|
|
|
|
|
|
42
|
4
|
|
|
4
|
|
1236
|
no Moose; |
|
|
4
|
|
|
|
|
8
|
|
|
|
4
|
|
|
|
|
33
|
|
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=pod |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=encoding UTF-8 |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 NAME |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Net::API::RPX::Exception::Usage - For when the interface is used wrongly |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 VERSION |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
version 1.000001 |
|
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) 2017 by Cloudtone Studios. |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
This is free software, licensed under: |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
The (three-clause) BSD License |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=cut |