Filename | /home/mickey/git_tree/PONAPI/Server/lib/PONAPI/Builder/Errors.pm |
Statements | Executed 8 statements in 235µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 18µs | 3.09ms | BEGIN@4 | PONAPI::Builder::Errors::
1 | 1 | 1 | 8µs | 76µs | BEGIN@33 | PONAPI::Builder::Errors::
0 | 0 | 0 | 0s | 0s | __ANON__[lib/PONAPI/Builder/Errors.pm:14] | PONAPI::Builder::Errors::
0 | 0 | 0 | 0s | 0s | add_error | PONAPI::Builder::Errors::
0 | 0 | 0 | 0s | 0s | build | PONAPI::Builder::Errors::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # ABSTRACT: document builder - errors | ||||
2 | package PONAPI::Builder::Errors; | ||||
3 | |||||
4 | 2 | 158µs | 2 | 6.15ms | # spent 3.09ms (18µs+3.07) within PONAPI::Builder::Errors::BEGIN@4 which was called:
# once (18µs+3.07ms) by PONAPI::Builder::Document::BEGIN@8 at line 4 # spent 3.09ms making 1 call to PONAPI::Builder::Errors::BEGIN@4
# spent 3.07ms making 1 call to Moose::import |
5 | |||||
6 | 1 | 2µs | 1 | 7.70ms | with 'PONAPI::Builder'; # spent 7.70ms making 1 call to Moose::with |
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 | 1 | 7µs | 1 | 11.5ms | handles => { # spent 11.5ms making 1 call to Moose::has |
16 | 'has_errors' => 'count', | ||||
17 | # private ... | ||||
18 | '_add_error' => 'push', | ||||
19 | } | ||||
20 | ); | ||||
21 | |||||
22 | sub add_error { | ||||
23 | my ( $self, $error ) = @_; | ||||
24 | $self->_add_error( $error ); | ||||
25 | } | ||||
26 | |||||
27 | sub build { | ||||
28 | my $self = $_[0]; | ||||
29 | return +[ @{ $self->_errors } ]; | ||||
30 | } | ||||
31 | |||||
32 | 1 | 6µs | 2 | 2.32ms | __PACKAGE__->meta->make_immutable; # spent 2.30ms making 1 call to Class::MOP::Class::make_immutable
# spent 21µs making 1 call to PONAPI::Builder::Errors::meta |
33 | 3 | 62µs | 2 | 143µs | # spent 76µs (8+68) within PONAPI::Builder::Errors::BEGIN@33 which was called:
# once (8µs+68µs) by PONAPI::Builder::Document::BEGIN@8 at line 33 # spent 76µs making 1 call to PONAPI::Builder::Errors::BEGIN@33
# spent 68µs making 1 call to Moose::unimport |
34 | |||||
35 | __END__ |