Amazon/Validate/ItemSearch/uk/EAN.pm

filter: Statementstmt 95.9% 143 / 149 Branchbran 25.0% 1 / 4 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 4 totaltotal 89.3% 151 / 169 CC 5 SCAR 15.6
CC
5
Cov
93%
find_match
12.0
user_or_default
3.8
BEGIN
1.0
CRAP 4.8
« Amazon/Validate/ItemSearch/us/Title.pm ↑ Summary Amazon/Request/ASIN.pm »
1 # -*- perl -*-
2 # !!! DO NOT EDIT !!!
3 # This file was automatically generated.
4 package Net::Amazon::Validate::ItemSearch::uk::EAN;
5  
6 1 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
11 1 my ($class , %options) = @_;
12 1 my $self = {
13 '_default' => 'Books',
14 %options,
15 };
16  
17 1 push @{$self->{_options}}, 'Actor';
18 1 push @{$self->{_options}}, 'Apparel';
19 1 push @{$self->{_options}}, 'Artist';
20 1 push @{$self->{_options}}, 'AudienceRating';
21 1 push @{$self->{_options}}, 'Author';
22 1 push @{$self->{_options}}, 'Availability';
23 1 push @{$self->{_options}}, 'Baby';
24 1 push @{$self->{_options}}, 'Beauty';
25 1 push @{$self->{_options}}, 'Blended';
26 1 push @{$self->{_options}}, 'Books';
27 1 push @{$self->{_options}}, 'Brand';
28 1 push @{$self->{_options}}, 'BrowseNode';
29 1 push @{$self->{_options}}, 'Classical';
30 1 push @{$self->{_options}}, 'Composer';
31 1 push @{$self->{_options}}, 'Condition';
32 1 push @{$self->{_options}}, 'Conductor';
33 1 push @{$self->{_options}}, 'Count';
34 1 push @{$self->{_options}}, 'DVD';
35 1 push @{$self->{_options}}, 'DeliveryMethod';
36 1 push @{$self->{_options}}, 'Director';
37 1 push @{$self->{_options}}, 'Electronics';
38 1 push @{$self->{_options}}, 'Format';
39 1 push @{$self->{_options}}, 'HealthPersonalCare';
40 1 push @{$self->{_options}}, 'HomeGarden';
41 1 push @{$self->{_options}}, 'ISPUPostalCode';
42 1 push @{$self->{_options}}, 'ItemPage';
43 1 push @{$self->{_options}}, 'Jewelry';
44 1 push @{$self->{_options}}, 'Keywords';
45 1 push @{$self->{_options}}, 'Kitchen';
46 1 push @{$self->{_options}}, 'MP3Downloads';
47 1 push @{$self->{_options}}, 'Magazines';
48 1 push @{$self->{_options}}, 'Manufacturer';
49 1 push @{$self->{_options}}, 'MaximumPrice';
50 1 push @{$self->{_options}}, 'MerchantId';
51 1 push @{$self->{_options}}, 'MinimumPrice';
52 1 push @{$self->{_options}}, 'Music';
53 1 push @{$self->{_options}}, 'MusicLabel';
54 1 push @{$self->{_options}}, 'MusicTracks';
55 1 push @{$self->{_options}}, 'OfficeProducts';
56 1 push @{$self->{_options}}, 'Orchestra';
57 1 push @{$self->{_options}}, 'OutdoorLiving';
58 1 push @{$self->{_options}}, 'Performer';
59 1 push @{$self->{_options}}, 'PostalCode';
60 1 push @{$self->{_options}}, 'Power';
61 1 push @{$self->{_options}}, 'Publisher';
62 1 push @{$self->{_options}}, 'ResponseGroup';
63 1 push @{$self->{_options}}, 'ReviewSort';
64 1 push @{$self->{_options}}, 'SearchIndex';
65 1 push @{$self->{_options}}, 'Shoes';
66 1 push @{$self->{_options}}, 'Software';
67 1 push @{$self->{_options}}, 'SoftwareVideoGames';
68 1 push @{$self->{_options}}, 'Sort';
69 1 push @{$self->{_options}}, 'State';
70 1 push @{$self->{_options}}, 'TagPage';
71 1 push @{$self->{_options}}, 'TagSort';
72 1 push @{$self->{_options}}, 'TagsPerPage';
73 1 push @{$self->{_options}}, 'TextStream';
74 1 push @{$self->{_options}}, 'Title';
75 1 push @{$self->{_options}}, 'Toys';
76 1 push @{$self->{_options}}, 'VHS';
77 1 push @{$self->{_options}}, 'Video';
78 1 push @{$self->{_options}}, 'VideoGames';
79 1 push @{$self->{_options}}, 'Watches';
80  
81 1 bless $self, $class;
82 }
83  
84 1 ▶sub user_or_default {
Subroutine user_or_default: called CC=3 SCAR=13.3
Pod undocumented
85 1 my ($self, $user) = @_;
86 1 ▶ if (defined $user && length($user) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $user and length $user > 0) 0 1 1
Condition33%1/3
defined $user and length $user > 0
!ll&&!rl&&r
100
MC/DC0%0/2
defined $user and length $user > 0
defined $user length $user > 0
Truth table33%1/3
A and B
A= defined $userB= length $user > 0
ABresult
0X0
100
111
87 0 return $self->find_match($user);
88 }
89 1 return $self->default();
90 }
91  
92 1 ▶sub default {
Subroutine default: called CC=1 SCAR=0.0
Pod undocumented
93 1 my ($self) = @_;
94 1 return $self->{_default};
95 }
96  
97 0 ▶sub find_match {
Subroutine find_match: not called CC=3 SCAR=24.8
Pod undocumented
98 0 my ($self, $value) = @_;
99 0 for (@{$self->{_options}}) {
100 0 ▶ return $_ if lc($_) eq lc($value);
Branch: 1 branch
BranchTrueFalseTotal
if lc $_ eq lc $value 0 0 0
101 }
102 0 die "$value is not a valid value for uk::EAN!\n";
103 }
104  
105 1 1;
106  
107 __END__
« Amazon/Validate/ItemSearch/us/Title.pm ↑ Summary Amazon/Request/ASIN.pm »