line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
4
|
|
|
4
|
|
545
|
use 5.006; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
114
|
|
2
|
4
|
|
|
4
|
|
11
|
use strict; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
94
|
|
3
|
4
|
|
|
4
|
|
11
|
use warnings; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
179
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Net::API::RPX::Exception::Usage; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: For when the interface is used wrongly |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '1.000000'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KONOBI'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
4
|
|
|
4
|
|
426
|
use Moose qw( has extends around ); |
|
4
|
|
|
|
|
291059
|
|
|
4
|
|
|
|
|
29
|
|
14
|
4
|
|
|
4
|
|
17743
|
use namespace::autoclean; |
|
4
|
|
|
|
|
3931
|
|
|
4
|
|
|
|
|
16
|
|
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
|
|
19
|
my ($self) = @_; |
25
|
12
|
|
|
|
|
257
|
return $self->method_name . '(' . $self->signature . ')'; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub _explanation { |
29
|
12
|
|
|
12
|
|
11161
|
my ($self) = @_; |
30
|
12
|
|
|
|
|
339
|
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
|
|
744
|
no Moose; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
22
|
|
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.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 |