| 1 | 2 | ▶ | use v5.20.0; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | |||
| 3 | package JMAP::Tester::Result::Failure 0.113; | ||
| 4 | # ABSTRACT: what you get when your JMAP request utterly fails | ||
| 5 | |||
| 6 | 2 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 2 | with 'JMAP::Tester::Role::HTTPResult'; | |
| 8 | |||
| 9 | 2 | ▶ | use experimental 'signatures'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 2 | ▶ | use Sub::Install (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | 2 | ▶ | use namespace::clean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | |||
| 15 | #pod =head1 OVERVIEW | ||
| 16 | #pod | ||
| 17 | #pod This is the sort of worthless object you get back when your JMAP request fails. | ||
| 18 | #pod This class should be replaced, in most cases, by more useful classes in the | ||
| 19 | #pod future. | ||
| 20 | #pod | ||
| 21 | #pod It's got an C<is_success> method. It returns false. It also has: | ||
| 22 | #pod | ||
| 23 | #pod =method ident | ||
| 24 | #pod | ||
| 25 | #pod An error identifier. May or may not be defined. | ||
| 26 | #pod | ||
| 27 | #pod =cut | ||
| 28 | |||
| 29 | 5 | ▶ | sub is_success { 0 } |
|
Subroutine
is_success: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 30 | |||
| 31 | 2 | has ident => (is => 'ro', predicate => 'has_ident'); | |
| 32 | |||
| 33 | 2 | for my $method (qw( | |
| 34 | sentence | ||
| 35 | sentences | ||
| 36 | single_sentence | ||
| 37 | sentence_named | ||
| 38 | assert_n_sentences | ||
| 39 | paragraph | ||
| 40 | paragraphs | ||
| 41 | assert_n_paragraphs | ||
| 42 | paragraph_by_client_id | ||
| 43 | as_triples | ||
| 44 | as_stripped_triples | ||
| 45 | as_pairs | ||
| 46 | as_stripped_pairs | ||
| 47 | |||
| 48 | wrapper_properties | ||
| 49 | )) { | ||
| 50 | Sub::Install::install_sub({ | ||
| 51 | into => __PACKAGE__, | ||
| 52 | as => $method, | ||
| 53 | 14 | ▶ | code => sub ($self, @) { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 54 | 14 | $self->abort("tried to call Response method $method on a Failure", [ Result => $self ]); | |
| 55 | } | ||
| 56 | 28 | }); | |
| 57 | } | ||
| 58 | |||
| 59 | 2 | 1; | |
| 60 | |||
| 61 | __END__ | ||