| 1 | package PAGI::StructuredParameters::Exception::InvalidArrayPointer; | ||
| 2 | 5 | $PAGI::StructuredParameters::Exception::InvalidArrayPointer::VERSION = '0.001001'; | |
| 3 | 5 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 5 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 5 | ▶ | use parent -norequire, 'PAGI::StructuredParameters::Exception'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 5 | ▶ | use PAGI::StructuredParameters::Exception; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | # Raised when nested data names an array rule but the value at that pointer is | ||
| 9 | # not an arrayref. | ||
| 10 | |||
| 11 | 1 | ▶ | sub pointer { my ($self) = @_; $self->{pointer} } |
|
Subroutine
pointer: called CC=1 SCAR=0.0
Pod
documented
| |||
| 12 | |||
| 13 | 1 | ▶ | sub message { |
|
Subroutine
message: called CC=1 SCAR=0.0
Pod
documented
| |||
| 14 | 1 | my ($self) = @_; | |
| 15 | 1 | return "Pointer '@{[ $self->pointer ]}' is not an array."; | |
| 16 | } | ||
| 17 | |||
| 18 | 5 | 1; | |
| 19 | |||
| 20 | =encoding utf8 | ||
| 21 | |||
| 22 | =head1 NAME | ||
| 23 | |||
| 24 | PAGI::StructuredParameters::Exception::InvalidArrayPointer - Expected an array but found another shape | ||
| 25 | |||
| 26 | =head1 DESCRIPTION | ||
| 27 | |||
| 28 | Raised by L<PAGI::StructuredParameters> when a rule expects an array at a given | ||
| 29 | pointer in nested body data (C<src =E<gt> 'data'>) but the value there is not an | ||
| 30 | arrayref. Subclass of L<PAGI::StructuredParameters::Exception> (HTTP status 400). | ||
| 31 | |||
| 32 | =head1 METHODS | ||
| 33 | |||
| 34 | =head2 pointer | ||
| 35 | |||
| 36 | The dotted key path whose value was not an array. | ||
| 37 | |||
| 38 | =head2 message | ||
| 39 | |||
| 40 | "Pointer 'cards' is not an array." | ||
| 41 | |||
| 42 | =head1 AUTHOR | ||
| 43 | |||
| 44 | John Napiorkowski C<< <jjnapiork@cpan.org> >> | ||
| 45 | |||
| 46 | =head1 COPYRIGHT & LICENSE | ||
| 47 | |||
| 48 | Copyright 2026, John Napiorkowski. This library is free software; you can | ||
| 49 | redistribute it and/or modify it under the same terms as Perl itself. | ||
| 50 | |||
| 51 | =cut | ||