Amazon/Validate/ItemSearch/uk/Music.pm untested

filter: Statementstmt 0.0% 0 / 67 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 87 CC 3 SCAR 13.3
CC
3
Cov
0%
user_or_default
6.0
find_match
6.0
new
2.0
CRAP 3.8
1 # -*- perl -*-
2 # !!! DO NOT EDIT !!!
3 # This file was automatically generated.
4 package Net::Amazon::Validate::ItemSearch::uk::Music;
5  
6 use 5.006;
7 use strict;
8 use warnings;
9  
10 sub new {
11 my ($class , %options) = @_;
12 my $self = {
13 '_default' => 'Title',
14 %options,
15 };
16  
17 push @{$self->{_options}}, 'Artist';
18 push @{$self->{_options}}, 'Availability';
19 push @{$self->{_options}}, 'BrowseNode';
20 push @{$self->{_options}}, 'Condition';
21 push @{$self->{_options}}, 'Count';
22 push @{$self->{_options}}, 'Format';
23 push @{$self->{_options}}, 'ItemPage';
24 push @{$self->{_options}}, 'ItemPage';
25 push @{$self->{_options}}, 'Keywords';
26 push @{$self->{_options}}, 'Keywords';
27 push @{$self->{_options}}, 'Magazines';
28 push @{$self->{_options}}, 'MaximumPrice';
29 push @{$self->{_options}}, 'MerchantId';
30 push @{$self->{_options}}, 'MinimumPrice';
31 push @{$self->{_options}}, 'MusicLabel';
32 push @{$self->{_options}}, 'Performer';
33 push @{$self->{_options}}, 'PostalCode';
34 push @{$self->{_options}}, 'Sort';
35 push @{$self->{_options}}, 'Sort';
36 push @{$self->{_options}}, 'State';
37 push @{$self->{_options}}, 'Title';
38  
39 bless $self, $class;
40 }
41  
42 sub user_or_default {
43 my ($self, $user) = @_;
44 if (defined $user && length($user) > 0) {
45 return $self->find_match($user);
46 }
47 return $self->default();
48 }
49  
50 sub default {
51 my ($self) = @_;
52 return $self->{_default};
53 }
54  
55 sub find_match {
56 my ($self, $value) = @_;
57 for (@{$self->{_options}}) {
58 return $_ if lc($_) eq lc($value);
59 }
60 die "$value is not a valid value for uk::Music!\n";
61 }
62  
63 1;
64  
65 __END__