PONAPI/Builder/Errors.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 2 totaltotal 91.3% 21 / 23 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
__ANON__
1.0
add_error
1.0
CRAP 1.0
« PONAPI/DAO/Request/Role/HasSort.pm ↑ Summary PONAPI/Builder/Role/HasLinksBuilder.pm »
1 # ABSTRACT: document builder - errors
2 package PONAPI::Builder::Errors;
3  
4 23 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 23 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 98 ▶ default => sub { +[] },
Subroutine __ANON__: called CC=1 SCAR=0.0
15 23 handles => {
16 'has_errors' => 'count',
17 # private ...
18 '_add_error' => 'push',
19 }
20 );
21  
22 sub add_error {
23 112 ▶ my ( $self, $error ) = @_;
Subroutine add_error: called CC=1 SCAR=0.0
Pod undocumented
24 112 $self->_add_error( $error );
25 }
26  
27 sub build {
28 110 ▶ my $self = $_[0];
Subroutine build: called CC=1 SCAR=0.0
Pod undocumented
29 110 return +[ @{ $self->_errors } ];
30 }
31  
32 23 __PACKAGE__->meta->make_immutable;
33 23 ▶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::Builder::Errors - document builder - errors
44  
45 =head1 VERSION
46  
47 version 0.002012
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
« PONAPI/DAO/Request/Role/HasSort.pm ↑ Summary PONAPI/Builder/Role/HasLinksBuilder.pm »