| 1 | # ABSTRACT: document builder - errors | ||
| 2 | package PONAPI::Document::Builder::Errors; | ||
| 3 | |||
| 4 | 15 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 15 | with 'PONAPI::Document::Builder'; | |
| 7 | |||
| 8 | has _errors => ( | ||
| 9 | init_arg => undef, | ||
| 10 | traits => [ 'Array' ], | ||
| 11 | is => 'ro', | ||
| 12 | isa => 'ArrayRef[ HashRef ]', | ||
| 13 | lazy => 1, | ||
| 14 | 2 | ▶ | default => sub { +[] }, |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 15 | 15 | handles => { | |
| 16 | 'has_errors' => 'count', | ||
| 17 | # private ... | ||
| 18 | '_add_error' => 'push', | ||
| 19 | } | ||
| 20 | ); | ||
| 21 | |||
| 22 | sub add_error { | ||
| 23 | 7 | ▶ | my ( $self, $error ) = @_; |
|
Subroutine
add_error: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 24 | 7 | $self->_add_error( $error ); | |
| 25 | } | ||
| 26 | |||
| 27 | sub build { | ||
| 28 | 14 | ▶ | my $self = $_[0]; |
|
Subroutine
build: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 29 | 14 | return +[ @{ $self->_errors } ]; | |
| 30 | } | ||
| 31 | |||
| 32 | 15 | __PACKAGE__->meta->make_immutable; | |
| 33 | 15 | ▶ | no Moose; 1; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 34 | |||
| 35 | __END__ | ||
| 36 | |||
| 37 | =pod | ||
| 38 | |||
| 39 | =encoding UTF-8 | ||
| 40 | |||
| 41 | =head1 NAME | ||
| 42 | |||
| 43 | PONAPI::Document::Builder::Errors - document builder - errors | ||
| 44 | |||
| 45 | =head1 VERSION | ||
| 46 | |||
| 47 | version 0.001001 | ||
| 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 | ||