| 1 | package Amazon::SimpleDB::QueryResponse; | ||||||||||||
| 2 | 2 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 2 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | |||||||||||||
| 5 | 2 | ▶ | use base 'Amazon::SimpleDB::Response'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | |||||||||||||
| 7 | 2 | ▶ | use Amazon::SimpleDB::Item; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | 2 | ▶ | use Carp qw( croak ); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | |||||||||||||
| 10 | 0 | ▶ | sub new { | ||||||||||
|
Subroutine
new: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||
| 11 | 0 | my $class = shift; | |||||||||||
| 12 | 0 | ▶ | my $args = shift || {}; | ||||||||||
|
Condition0%0/2
shift() || {}
MC/DC0%0/1
shift() || {}
shift()
Truth table0%0/2
A
A= shift()
| |||||||||||||
| 13 | 0 | ▶ | croak "No domain" unless $args->{domain}; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 14 | 0 | return $class->SUPER::new($args); | |||||||||||
| 15 | } | ||||||||||||
| 16 | |||||||||||||
| 17 | 0 | ▶ | sub results { | ||||||||||
|
Subroutine
results: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 18 | 0 | my $self = shift; | |||||||||||
| 19 | 0 | my $results = $self->{content}->{QueryResponse}{QueryResult}{ItemName}; | |||||||||||
| 20 | 0 | $self->{next} = $self->{content}->{QueryResponse}{QueryResult}{NextToken}; | |||||||||||
| 21 | my @items = map { | ||||||||||||
| 22 | 0 | Amazon::SimpleDB::Item->new( | |||||||||||
| 23 | { | ||||||||||||
| 24 | name => $_, | ||||||||||||
| 25 | domain => $self->{domain}, | ||||||||||||
| 26 | account => $self->{account} | ||||||||||||
| 27 | } | ||||||||||||
| 28 | 0 | ); | |||||||||||
| 29 | } @$results; | ||||||||||||
| 30 | 0 | ▶ | return wantarray ? @items : $items[0]; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 31 | } | ||||||||||||
| 32 | |||||||||||||
| 33 | 0 | ▶ | sub next { return $_[0]->{next} } | ||||||||||
|
Subroutine
next: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 34 | |||||||||||||
| 35 | 2 | 1; | |||||||||||
| 36 | |||||||||||||
| 37 | __END__ | ||||||||||||