SimpleDB/Domain.pm

filter: Statementstmt 43.3% 13 / 30 Branchbran 0.0% 0 / 10 Conditioncond 0.0% 0 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 44.4% 4 / 9 Podpod 100% 5 / 5 totaltotal 36.6% 22 / 60 CC 8 SCAR 27.1
CC
8
Cov
30%
query
30.0
new
20.0
account
2.0
CRAP 15.0
« SimpleDB.pm ↑ Summary SimpleDB/GetAttributesResponse.pm »
1 package Amazon::SimpleDB::Domain;
2 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 3 ▶use Amazon::SimpleDB::Response;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use Carp qw( croak );
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 0 ▶sub new {
Subroutine new: not called CC=4 SCAR=30.0
Pod documented
9 0 my $class = shift;
10 0 ▶ my $args = shift || {};
Condition0%0/2
shift() || {}
l!l
00
MC/DC0%0/1
shift() || {}
shift()
Truth table0%0/2
A
A= shift()
Aresult
11
00
11 0 my $self = bless $args, $class;
12 0 ▶ croak "No account" unless $self->{account};
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"account"} 0 0 0
13 0 ▶ croak "No (domain) name" unless $self->{name};
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"name"} 0 0 0
14 0 return $self;
15 }
16  
17 0 ▶sub account { return $_[0]->{account} }
Subroutine account: not called CC=1 SCAR=6.9
Pod documented
18 0 ▶sub name { return $_[0]->{name} }
Subroutine name: not called CC=1 SCAR=6.9
Pod documented
19 0 ▶sub delete { return $_[0]->{account}->delete_domain($_[0]->{name}) }
Subroutine delete: not called CC=1 SCAR=6.9
Pod documented
20  
21 # note: limit can be between 1 and 250. default is 100.
22 # note: cannot run longer then 5 seconds or times out.
23 0 ▶sub query {
Subroutine query: not called CC=5 SCAR=34.0
Pod documented
24 0 my $self = shift;
25 0 ▶ my $args = shift || {};
Condition0%0/2
shift() || {}
l!l
00
MC/DC0%0/1
shift() || {}
shift()
Truth table0%0/2
A
A= shift()
Aresult
11
00
26 0 my $params = {DomainName => $self->{'name'}};
27 0 ▶ $params->{MaxNumberOfItems} = $args->{'limit'} if $args->{'limit'};
Branch: 1 branch
BranchTrueFalseTotal
if $args->{"limit"} 0 0 0
28 0 ▶ $params->{NextToken} = $args->{'next'} if $args->{'next'};
Branch: 1 branch
BranchTrueFalseTotal
if $args->{"next"} 0 0 0
29 0 ▶ $params->{QueryExpression} = $args->{'query'} if $args->{'query'};
Branch: 1 branch
BranchTrueFalseTotal
if $args->{"query"} 0 0 0
30 0 my $account = $self->{account};
31 return
32 Amazon::SimpleDB::Response->new(
33 http_response => $account->request('Query', $params),
34 domain => $self,
35 account => $self->{account},
36 0 );
37 }
38  
39 3 1;
40  
41 __END__
« SimpleDB.pm ↑ Summary SimpleDB/GetAttributesResponse.pm »