r8831 - in /branches/upstream/libnet-amazon-perl/current: Changes META.yml README lib/Net/Amazon.pm lib/Net/Amazon/Property.pm lib/Net/Amazon/Property/Book.pm t/001ASIN.t

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Sun Nov 4 13:53:50 UTC 2007


Author: gregoa-guest
Date: Sun Nov  4 13:53:50 2007
New Revision: 8831

URL: http://svn.debian.org/wsvn/?sc=1&rev=8831
Log:
[svn-upgrade] Integrating new upstream version, libnet-amazon-perl (0.44)

Modified:
    branches/upstream/libnet-amazon-perl/current/Changes
    branches/upstream/libnet-amazon-perl/current/META.yml
    branches/upstream/libnet-amazon-perl/current/README
    branches/upstream/libnet-amazon-perl/current/lib/Net/Amazon.pm
    branches/upstream/libnet-amazon-perl/current/lib/Net/Amazon/Property.pm
    branches/upstream/libnet-amazon-perl/current/lib/Net/Amazon/Property/Book.pm
    branches/upstream/libnet-amazon-perl/current/t/001ASIN.t

Modified: branches/upstream/libnet-amazon-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libnet-amazon-perl/current/Changes?rev=8831&op=diff
==============================================================================
--- branches/upstream/libnet-amazon-perl/current/Changes (original)
+++ branches/upstream/libnet-amazon-perl/current/Changes Sun Nov  4 13:53:50 2007
@@ -1,4 +1,13 @@
 Revision history for Perl extension Net::Amazon:
+
+0.44 (11/03/2007)
+   (cb) Patch by Carl Franks <fireartist at gmail.com> to add support for 
+        returning the currency code, and unformatted price.
+   (cb) Patch by Carl Franks <fireartist at gmail.com> to address the confusion
+        between release date, and publication date.  Prior to version 0.44
+        release date was the publication date.  Now release date is the
+        release date, and a function to return the publication date has been
+        added.
 
 0.43 (06/20/2007)
    (cb) Simon Wistow <simon at thegestalt.org> found an bug with wishlist

Modified: branches/upstream/libnet-amazon-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libnet-amazon-perl/current/META.yml?rev=8831&op=diff
==============================================================================
--- branches/upstream/libnet-amazon-perl/current/META.yml (original)
+++ branches/upstream/libnet-amazon-perl/current/META.yml Sun Nov  4 13:53:50 2007
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Net-Amazon
-version:      0.43
+version:      0.44
 version_from: lib/Net/Amazon.pm
 installdirs:  site
 requires:
@@ -13,4 +13,4 @@
     XML::Simple:                   2.08
 
 distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.30
+generated_by: ExtUtils::MakeMaker version 6.17

Modified: branches/upstream/libnet-amazon-perl/current/README
URL: http://svn.debian.org/wsvn/branches/upstream/libnet-amazon-perl/current/README?rev=8831&op=diff
==============================================================================
--- branches/upstream/libnet-amazon-perl/current/README (original)
+++ branches/upstream/libnet-amazon-perl/current/README Sun Nov  4 13:53:50 2007
@@ -1,5 +1,5 @@
 ######################################################################
-    Net::Amazon 0.43
+    Net::Amazon 0.44
 ######################################################################
 NAME
     Net::Amazon - Framework for accessing amazon.com via REST

Modified: branches/upstream/libnet-amazon-perl/current/lib/Net/Amazon.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libnet-amazon-perl/current/lib/Net/Amazon.pm?rev=8831&op=diff
==============================================================================
--- branches/upstream/libnet-amazon-perl/current/lib/Net/Amazon.pm (original)
+++ branches/upstream/libnet-amazon-perl/current/lib/Net/Amazon.pm Sun Nov  4 13:53:50 2007
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 
-our $VERSION          = '0.43';
+our $VERSION          = '0.44';
 our $WSDL_DATE        = '2007-01-17';
 our $Locale           = 'us';
 our @CANNED_RESPONSES = ();

Modified: branches/upstream/libnet-amazon-perl/current/lib/Net/Amazon/Property.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libnet-amazon-perl/current/lib/Net/Amazon/Property.pm?rev=8831&op=diff
==============================================================================
--- branches/upstream/libnet-amazon-perl/current/lib/Net/Amazon/Property.pm (original)
+++ branches/upstream/libnet-amazon-perl/current/lib/Net/Amazon/Property.pm Sun Nov  4 13:53:50 2007
@@ -41,6 +41,8 @@
     TotalOffers => [qw(Offers TotalOffers)],
     UsedCount => [qw(OfferSummary TotalUsed)],
     UsedPrice => [qw(OfferSummary LowestUsedPrice FormattedPrice)],
+    RawListPrice => [qw(ItemAttributes ListPrice Amount)],
+    CurrencyCode => [qw(ItemAttributes ListPrice CurrencyCode)],
 );
 
 our @DEFAULT_ATTRIBUTES = qw(
@@ -308,6 +310,14 @@
 
 Used price of the item
 
+=item RawListPrice()
+
+Unformatted list price as an integer, without currency symbol.
+
+=item CurrencyCode()
+
+The currency code for the L</ListPrice()>, e.g. C<USD>.
+
 =item SalesRank()
 
 Sales rank of the item (contains digits and commas, like 1,000,001)

Modified: branches/upstream/libnet-amazon-perl/current/lib/Net/Amazon/Property/Book.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libnet-amazon-perl/current/lib/Net/Amazon/Property/Book.pm?rev=8831&op=diff
==============================================================================
--- branches/upstream/libnet-amazon-perl/current/lib/Net/Amazon/Property/Book.pm (original)
+++ branches/upstream/libnet-amazon-perl/current/lib/Net/Amazon/Property/Book.pm Sun Nov  4 13:53:50 2007
@@ -6,7 +6,7 @@
 use base qw(Net::Amazon::Property);
 
 __PACKAGE__->make_accessor($_) for qw(title publisher binding isbn 
-    dewey_decimal numpages edition ean);
+    dewey_decimal numpages edition ean publication_date);
 __PACKAGE__->make_array_accessor($_) for qw(authors);
 
 ##################################################
@@ -50,7 +50,9 @@
     }
     $self->year($year);
 
-    $self->ReleaseDate($ref->{PublicationDate});
+    $self->publication_date($ref->{PublicationDate});
+
+    $self->ReleaseDate($ref->{ReleaseDate});
 }
 
 ##################################################
@@ -142,6 +144,18 @@
 
 Returns the Dewey decimal number, this is for non-fiction only.
 
+=item publication_date()
+
+Returns the publication date.
+
+=item ReleaseDate()
+
+Returns the release date.
+
+For historical reasons, this method used to return the publication date. 
+However, as of version Net::Amazon 0.44 the release date is returned, and 
+a separate L</publication_date()> method is available. 
+
 =item new(xmlref => $xmlref)
 
 Initializes an object by passing a hash of hashes structure containing

Modified: branches/upstream/libnet-amazon-perl/current/t/001ASIN.t
URL: http://svn.debian.org/wsvn/branches/upstream/libnet-amazon-perl/current/t/001ASIN.t?rev=8831&op=diff
==============================================================================
--- branches/upstream/libnet-amazon-perl/current/t/001ASIN.t (original)
+++ branches/upstream/libnet-amazon-perl/current/t/001ASIN.t Sun Nov  4 13:53:50 2007
@@ -8,7 +8,7 @@
 use warnings;
 use strict;
 
-use Test::More tests => 36;
+use Test::More tests => 39;
 BEGIN { use_ok('Net::Amazon') };
 
 #use Log::Log4perl qw(:easy);
@@ -98,9 +98,19 @@
 like($book->title, qr/^Design Patterns/, "Title");
 like($book->ProductName, qr/^Design Patterns/, "ProductName");
 is($book->year, "1995", "Year");
+is($book->publication_date, "1995-01-15");
 like($book->OurPrice, qr/\$/, "Amazon Price");
 like($book->ListPrice, qr/\$/, "List Price");
+is($book->CurrencyCode, "USD");
 is($book->binding, "Hardcover", "Binding");
+
+# check RawListPrice eq ListPrice without the 
+# dollar sign and decimal point
+my $ListPrice = $book->ListPrice;
+$ListPrice =~ s/\$//;
+$ListPrice =~ s/\.//;
+
+is($book->RawListPrice, $ListPrice);
 
 ######################################################################
 # Successful ASIN fetch of a music CD




More information about the Pkg-perl-cvs-commits mailing list