| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# ABSTRACT: document builder - errors |
|
2
|
|
|
|
|
|
|
package PONAPI::Builder::Errors; |
|
3
|
|
|
|
|
|
|
|
|
4
|
23
|
|
|
23
|
|
121
|
use Moose; |
|
|
23
|
|
|
|
|
45
|
|
|
|
23
|
|
|
|
|
170
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
with 'PONAPI::Builder'; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has _errors => ( |
|
9
|
|
|
|
|
|
|
init_arg => undef, |
|
10
|
|
|
|
|
|
|
traits => [ 'Array' ], |
|
11
|
|
|
|
|
|
|
is => 'ro', |
|
12
|
|
|
|
|
|
|
isa => 'ArrayRef[ HashRef ]', |
|
13
|
|
|
|
|
|
|
lazy => 1, |
|
14
|
|
|
|
|
|
|
default => sub { +[] }, |
|
15
|
|
|
|
|
|
|
handles => { |
|
16
|
|
|
|
|
|
|
'has_errors' => 'count', |
|
17
|
|
|
|
|
|
|
# private ... |
|
18
|
|
|
|
|
|
|
'_add_error' => 'push', |
|
19
|
|
|
|
|
|
|
} |
|
20
|
|
|
|
|
|
|
); |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub add_error { |
|
23
|
112
|
|
|
112
|
0
|
194
|
my ( $self, $error ) = @_; |
|
24
|
112
|
|
|
|
|
5270
|
$self->_add_error( $error ); |
|
25
|
|
|
|
|
|
|
} |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub build { |
|
28
|
110
|
|
|
110
|
0
|
218
|
my $self = $_[0]; |
|
29
|
110
|
|
|
|
|
152
|
return +[ @{ $self->_errors } ]; |
|
|
110
|
|
|
|
|
3944
|
|
|
30
|
|
|
|
|
|
|
} |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
33
|
23
|
|
|
23
|
|
155212
|
no Moose; 1; |
|
|
23
|
|
|
|
|
51
|
|
|
|
23
|
|
|
|
|
123
|
|
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=pod |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=encoding UTF-8 |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 NAME |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
PONAPI::Builder::Errors - document builder - errors |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 VERSION |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
version 0.002005 |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 AUTHORS |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=over 4 |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=item * |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Mickey Nasriachi <mickey@cpan.org> |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=item * |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Stevan Little <stevan@cpan.org> |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=item * |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Brian Fraser <hugmeir@cpan.org> |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=back |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
This software is copyright (c) 2016 by Mickey Nasriachi, Stevan Little, Brian Fraser. |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
72
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=cut |