diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2007-11-11 06:55:13 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2007-11-11 06:55:13 +0000 |
| commit | 3282be229999dc36c197b264d63063a18d136331 (patch) | |
| tree | 98a42db29d955b39e7bed1b599fdcc56c3a29de9 /lib/Net/Amazon/Response | |
| parent | cfdd733c17cfa4f1a43b827a656e9e53cc2524ac (diff) | |
| download | xxv-3282be229999dc36c197b264d63063a18d136331.tar.gz xxv-3282be229999dc36c197b264d63063a18d136331.tar.bz2 | |
* Update installation list with required modules
* Remove unused/doubled provided external perl moduls
Diffstat (limited to 'lib/Net/Amazon/Response')
| -rw-r--r-- | lib/Net/Amazon/Response/ASIN.pm | 28 | ||||
| -rw-r--r-- | lib/Net/Amazon/Response/Artist.pm | 29 | ||||
| -rw-r--r-- | lib/Net/Amazon/Response/Blended.pm | 73 | ||||
| -rw-r--r-- | lib/Net/Amazon/Response/BrowseNode.pm | 29 | ||||
| -rw-r--r-- | lib/Net/Amazon/Response/Exchange.pm | 81 | ||||
| -rw-r--r-- | lib/Net/Amazon/Response/Keyword.pm | 29 | ||||
| -rw-r--r-- | lib/Net/Amazon/Response/Manufacturer.pm | 29 | ||||
| -rw-r--r-- | lib/Net/Amazon/Response/Power.pm | 28 | ||||
| -rw-r--r-- | lib/Net/Amazon/Response/Seller.pm | 78 | ||||
| -rw-r--r-- | lib/Net/Amazon/Response/Similar.pm | 28 | ||||
| -rw-r--r-- | lib/Net/Amazon/Response/TextStream.pm | 28 | ||||
| -rw-r--r-- | lib/Net/Amazon/Response/UPC.pm | 40 | ||||
| -rw-r--r-- | lib/Net/Amazon/Response/Wishlist.pm | 29 |
13 files changed, 0 insertions, 529 deletions
diff --git a/lib/Net/Amazon/Response/ASIN.pm b/lib/Net/Amazon/Response/ASIN.pm deleted file mode 100644 index 32bad76..0000000 --- a/lib/Net/Amazon/Response/ASIN.pm +++ /dev/null @@ -1,28 +0,0 @@ -###################################################################### -package Net::Amazon::Response::ASIN; -###################################################################### -use warnings; -use strict; -use base qw(Net::Amazon::Response); - -use Net::Amazon::Property; - -################################################## -sub new { -################################################## - my($class, %options) = @_; - - my $self = $class->SUPER::new(%options); - - bless $self, $class; # reconsecrate -} - -################################################## -sub as_string { -################################################## - my($self) = @_; - - return $self->SUPER::list_as_string($self->properties); -} - -1; diff --git a/lib/Net/Amazon/Response/Artist.pm b/lib/Net/Amazon/Response/Artist.pm deleted file mode 100644 index 0ee653b..0000000 --- a/lib/Net/Amazon/Response/Artist.pm +++ /dev/null @@ -1,29 +0,0 @@ -###################################################################### -package Net::Amazon::Response::Artist; -###################################################################### -use warnings; -use strict; -use base qw(Net::Amazon::Response); - -use Net::Amazon::Property; -use Data::Dumper; - -################################################## -sub new { -################################################## - my($class, %options) = @_; - - my $self = $class->SUPER::new(%options); - - bless $self, $class; # reconsecrate -} - -################################################## -sub as_string { -################################################## - my($self) = @_; - - return $self->SUPER::list_as_string($self->properties); -} - -1; diff --git a/lib/Net/Amazon/Response/Blended.pm b/lib/Net/Amazon/Response/Blended.pm deleted file mode 100644 index 3c75ded..0000000 --- a/lib/Net/Amazon/Response/Blended.pm +++ /dev/null @@ -1,73 +0,0 @@ -###################################################################### -package Net::Amazon::Response::Blended; -###################################################################### -use warnings; -use strict; -use base qw(Net::Amazon::Response); - -use Net::Amazon::Property; -use XML::Simple; - -our @FORCE_ARRAY_FIELDS = qw(ProductLine); - -################################################## -sub new { -################################################## - my($class, %options) = @_; - - my $self = $class->SUPER::new(%options); - - bless $self, $class; # reconsecrate -} - -################################################## -sub as_string { -################################################## - my($self) = @_; - - return $self->SUPER::list_as_string($self->properties); -} - -################################################## -sub xmlref_add { -################################################## - my($self, $xmlref) = @_; - - my $nof_items_added = 0; - - unless(ref($self->{xmlref}) eq "HASH" && - ref($self->{xmlref}->{Details}) eq "ARRAY") { - $self->{xmlref}->{Details} = []; - } - - if ($xmlref->{ProductLine} && (ref($xmlref->{ProductLine}) eq "ARRAY")) { - my @lines = @{$xmlref->{ProductLine}}; # Copy the lines - # sort the copies by relevance - @lines = sort { $a->{RelevanceRank} <=> $b->{RelevanceRank} } @lines; - - foreach (@lines) { - next unless $_->{ProductInfo}->{Details}; - my $details = $_->{ProductInfo}->{Details}; - if (ref($details) eq "ARRAY") { - push @{$self->{xmlref}->{Details}}, @$details; - $nof_items_added += scalar @$details; - } else { - push @{$self->{xmlref}->{Details}}, $details; - $nof_items_added++; - } - } - } - - return $nof_items_added; -} - -################################################## -sub xml_parse { -################################################## - my($self, $xml) = @_; - - my $xs = XML::Simple->new(); - return $xs->XMLin($xml, ForceArray => [ @FORCE_ARRAY_FIELDS ]); -} - -1; diff --git a/lib/Net/Amazon/Response/BrowseNode.pm b/lib/Net/Amazon/Response/BrowseNode.pm deleted file mode 100644 index 8f40a63..0000000 --- a/lib/Net/Amazon/Response/BrowseNode.pm +++ /dev/null @@ -1,29 +0,0 @@ -###################################################################### -package Net::Amazon::Response::BrowseNode; -###################################################################### -use warnings; -use strict; -use base qw(Net::Amazon::Response); - -use Net::Amazon::Property; -use Data::Dumper; - -################################################## -sub new { -################################################## - my($class, %options) = @_; - - my $self = $class->SUPER::new(%options); - - bless $self, $class; # reconsecrate -} - -################################################## -sub as_string { -################################################## - my($self) = @_; - - return $self->SUPER::list_as_string($self->properties); -} - -1; diff --git a/lib/Net/Amazon/Response/Exchange.pm b/lib/Net/Amazon/Response/Exchange.pm deleted file mode 100644 index 56852fe..0000000 --- a/lib/Net/Amazon/Response/Exchange.pm +++ /dev/null @@ -1,81 +0,0 @@ -###################################################################### -package Net::Amazon::Response::Exchange; -###################################################################### -use warnings; -use strict; -use base qw(Net::Amazon::Response); - -use Net::Amazon::Property; -use Net::Amazon::Result::Seller::Listing; -use Log::Log4perl qw(:easy); - -__PACKAGE__->make_array_accessor($_) for qw(listings); - -################################################## -sub new { -################################################## - my($class, %options) = @_; - - my $self = $class->SUPER::new(%options); - - bless $self, $class; # reconsecrate -} - -################################################## -sub result { -################################################## - my($self) = @_; - - if($self->is_success()) { - return Net::Amazon::Result::Seller::Listing->new( - xmlref => $self->{xmlref}->{ListingProductDetails}->[0], - ); - } - - return undef; -} - -################################################## -sub as_string { -################################################## - my($self) = @_; - - return "TODO: as_string not defined yet in ", __PACKAGE__; -} - -################################################## -sub xmlref_add { -################################################## - my($self, $xmlref) = @_; - - my $nof_items_added = 0; - - unless(ref($self->{xmlref}) eq "HASH" && - ref($self->{xmlref}->{ListingProductDetails}) eq "ARRAY") { - $self->{xmlref}->{Details} = []; - } - - if(ref($xmlref->{ListingProductDetails}) eq "ARRAY") { - # Is it an array of items? - push @{$self->{xmlref}->{ListingProductDetails}}, - @{$xmlref->{ListingProductDetails}}; - $nof_items_added = scalar @{$xmlref->{ListingProductDetails}}; - } else { - # It is a single item - push @{$self->{xmlref}->{ListingProductDetails}}, - $xmlref->{ListingProductDetails}; - $nof_items_added = 1; - } - - return $nof_items_added; -} - -################################################## -sub properties { -################################################## - my($self) = @_; - - die "properties() not defined in ", __PACKAGE__, ". Use result() instead"; -} - -1; diff --git a/lib/Net/Amazon/Response/Keyword.pm b/lib/Net/Amazon/Response/Keyword.pm deleted file mode 100644 index f6277d6..0000000 --- a/lib/Net/Amazon/Response/Keyword.pm +++ /dev/null @@ -1,29 +0,0 @@ -###################################################################### -package Net::Amazon::Response::Keyword; -###################################################################### -use warnings; -use strict; -use base qw(Net::Amazon::Response); - -use Net::Amazon::Property; -use Data::Dumper; - -################################################## -sub new { -################################################## - my($class, %options) = @_; - - my $self = $class->SUPER::new(%options); - - bless $self, $class; # reconsecrate -} - -################################################## -sub as_string { -################################################## - my($self) = @_; - - return $self->SUPER::list_as_string($self->properties); -} - -1; diff --git a/lib/Net/Amazon/Response/Manufacturer.pm b/lib/Net/Amazon/Response/Manufacturer.pm deleted file mode 100644 index 97ceebf..0000000 --- a/lib/Net/Amazon/Response/Manufacturer.pm +++ /dev/null @@ -1,29 +0,0 @@ -######################################################################
-package Net::Amazon::Response::Manufacturer;
-######################################################################
-use warnings;
-use strict;
-use base qw(Net::Amazon::Response);
-
-use Net::Amazon::Property;
-use Data::Dumper;
-
-##################################################
-sub new {
-##################################################
- my($class, %options) = @_;
-
- my $self = $class->SUPER::new(%options);
-
- bless $self, $class; # reconsecrate
-}
-
-##################################################
-sub as_string {
-##################################################
- my($self) = @_;
-
- return $self->SUPER::list_as_string($self->properties);
-}
-
-1;
diff --git a/lib/Net/Amazon/Response/Power.pm b/lib/Net/Amazon/Response/Power.pm deleted file mode 100644 index 88cdd2d..0000000 --- a/lib/Net/Amazon/Response/Power.pm +++ /dev/null @@ -1,28 +0,0 @@ -###################################################################### -package Net::Amazon::Response::Power; -###################################################################### -use warnings; -use strict; -use base qw(Net::Amazon::Response); - -use Net::Amazon::Property; - -################################################## -sub new { -################################################## - my($class, %options) = @_; - - my $self = $class->SUPER::new(%options); - - bless $self, $class; # reconsecrate -} - -################################################## -sub as_string { -################################################## - my($self) = @_; - - return $self->SUPER::list_as_string($self->properties); -} - -1; diff --git a/lib/Net/Amazon/Response/Seller.pm b/lib/Net/Amazon/Response/Seller.pm deleted file mode 100644 index f33ed50..0000000 --- a/lib/Net/Amazon/Response/Seller.pm +++ /dev/null @@ -1,78 +0,0 @@ -############################################# -package Net::Amazon::Response::Seller; -############################################# -use base qw(Net::Amazon::Response); - -use Net::Amazon::Result::Seller; -use Data::Dumper; -use Log::Log4perl qw(:easy); - -############################## -sub new { -############################## - my($class, %options) = @_; - - my $self = $class->SUPER::new(%options); - bless $self, $class; # reconsecrate -} - -################################################## -sub result { -################################################## - my($self) = @_; - - if($self->is_success()) { - DEBUG "Calling Seller constructor with ", Dumper($self); - return Net::Amazon::Result::Seller->new( - xmlref => $self->{xmlref}->{SellerSearchDetails}->[0], - ); - } - - return undef; -} - -################################################## -sub properties { -################################################## - my($self) = @_; - - die "properties() not defined in ", __PACKAGE__, ". Use result() instead"; -} - -################################################## -sub as_string { -################################################## - my($self) = @_; - - return $self->result()->as_string(); -} - -################################################## -sub xmlref_add { -################################################## - my($self, $xmlref) = @_; - - my $nof_items_added = 0; - - unless(ref($self->{xmlref}) eq "HASH" && - ref($self->{xmlref}->{SellerSearchDetails}) eq "ARRAY") { - $self->{xmlref}->{Details} = []; - } - - if(ref($xmlref->{SellerSearchDetails}) eq "ARRAY") { - # Is it an array of items? - push @{$self->{xmlref}->{SellerSearchDetails}}, - @{$xmlref->{SellerSearchDetails}}; - $nof_items_added = scalar @{$xmlref->{SellerSearchDetails}}; - } else { - # It is a single item - push @{$self->{xmlref}->{SellerSearchDetails}}, - $xmlref->{SellerSearchDetails}; - $nof_items_added = 1; - } - - #DEBUG("xmlref_add (after):", Data::Dumper::Dumper($self)); - return $nof_items_added; -} - -1; diff --git a/lib/Net/Amazon/Response/Similar.pm b/lib/Net/Amazon/Response/Similar.pm deleted file mode 100644 index 27add88..0000000 --- a/lib/Net/Amazon/Response/Similar.pm +++ /dev/null @@ -1,28 +0,0 @@ -###################################################################### -package Net::Amazon::Response::Similar; -###################################################################### -use warnings; -use strict; -use base qw(Net::Amazon::Response); - -use Net::Amazon::Property; - -################################################## -sub new { -################################################## - my($class, %options) = @_; - - my $self = $class->SUPER::new(%options); - - bless $self, $class; # reconsecrate -} - -################################################## -sub as_string { -################################################## - my($self) = @_; - - return $self->SUPER::list_as_string($self->properties); -} - -1; diff --git a/lib/Net/Amazon/Response/TextStream.pm b/lib/Net/Amazon/Response/TextStream.pm deleted file mode 100644 index 0cee872..0000000 --- a/lib/Net/Amazon/Response/TextStream.pm +++ /dev/null @@ -1,28 +0,0 @@ -######################################################################
-package Net::Amazon::Response::TextStream;
-######################################################################
-use warnings;
-use strict;
-use base qw(Net::Amazon::Response);
-
-use Net::Amazon::Property;
-
-##################################################
-sub new {
-##################################################
- my($class, %options) = @_;
-
- my $self = $class->SUPER::new(%options);
-
- bless $self, $class; # reconsecrate
-}
-
-##################################################
-sub as_string {
-##################################################
- my($self) = @_;
-
- return $self->SUPER::list_as_string($self->properties);
-}
-
-1;
diff --git a/lib/Net/Amazon/Response/UPC.pm b/lib/Net/Amazon/Response/UPC.pm deleted file mode 100644 index 4fba4ad..0000000 --- a/lib/Net/Amazon/Response/UPC.pm +++ /dev/null @@ -1,40 +0,0 @@ -###################################################################### -package Net::Amazon::Response::UPC; -###################################################################### -use warnings; -use strict; -use base qw(Net::Amazon::Response); - -use Net::Amazon::Property; - -################################################## -sub new { -################################################## - my($class, %options) = @_; - - my $self = $class->SUPER::new(%options); - - bless $self, $class; # reconsecrate -} - -################################################## -sub as_string { -################################################## - my($self) = @_; - - my($property) = $self->properties; - return $property->as_string(); -} - -################################################## -sub properties { -################################################## - my($self) = @_; - - my $property = Net::Amazon::Property::factory( - xmlref => $self->{xmlref}->{Details}->[0]); - - return ($property); -} - -1; diff --git a/lib/Net/Amazon/Response/Wishlist.pm b/lib/Net/Amazon/Response/Wishlist.pm deleted file mode 100644 index 15fd999..0000000 --- a/lib/Net/Amazon/Response/Wishlist.pm +++ /dev/null @@ -1,29 +0,0 @@ -###################################################################### -package Net::Amazon::Response::Wishlist; -###################################################################### -use warnings; -use strict; -use base qw(Net::Amazon::Response); - -use Net::Amazon::Property; -use Data::Dumper; - -################################################## -sub new { -################################################## - my($class, %options) = @_; - - my $self = $class->SUPER::new(%options); - - bless $self, $class; # reconsecrate -} - -################################################## -sub as_string { -################################################## - my($self) = @_; - - return $self->SUPER::list_as_string($self->properties); -} - -1; |
