This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years.
Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.
my $sentence = $response->sentence($n);
This method returns the nth Sentence of the response.
my @sentences = $response->sentences;
This method returns a list of all sentences in the response.
my $sentence = $response->single_sentence;
my $sentence = $response->single_sentence($name);
This method returns the only Sentence of the response, raising an exception if there's more than one Sentence. If $name is given, an exception is raised if the Sentence's name doesn't match the given name.
my $sentence = $response->sentence_named($name);
This method returns the sentence with the given name. If no such sentence exists, or if two sentences with the name exist, the tester will abort.
my ($s1, $s2, ...) = $response->assert_n_sentences($n);
This method returns all the sentences in the response, as long as there are exactly $n. Otherwise, it aborts.
my $para = $response->paragraph($n);
This method returns the nth Paragraph of the response.
my @paragraphs = $response->paragraphs;
This method returns a list of all paragraphs in the response.
my ($p1, $p2, ...) = $response->assert_n_paragraphs($n);
This method returns all the paragraphs in the response, as long as there are exactly $n. Otherwise, it aborts.
my $para = $response->paragraph_by_client_id($cid);
This returns the paragraph for the given client id. If there is no paragraph for that client id, an empty list is returned.
This method returns an arrayref of arrayrefs, holding the data returned by the JMAP server. With as_triples, some of the JSON data may be in objects provided by JSON::Typist. If you'd prefer raw data, use the as_stripped_triples form.
These methods do the same thing as as_triples and <as_stripped_triples>, but omit client ids.
Ricardo SIGNES <firstname.lastname@example.org>
This software is copyright (c) 2016 by Fastmail Pty. Ltd.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install JMAP::Tester, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.