r8833 - in /trunk/libnet-amazon-perl: Changes META.yml README debian/changelog 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:54:56 UTC 2007


Author: gregoa-guest
Date: Sun Nov  4 13:54:56 2007
New Revision: 8833

URL: http://svn.debian.org/wsvn/?sc=1&rev=8833
Log:
New upstream release.

Modified:
    trunk/libnet-amazon-perl/Changes
    trunk/libnet-amazon-perl/META.yml
    trunk/libnet-amazon-perl/README
    trunk/libnet-amazon-perl/debian/changelog
    trunk/libnet-amazon-perl/lib/Net/Amazon.pm
    trunk/libnet-amazon-perl/lib/Net/Amazon/Property.pm
    trunk/libnet-amazon-perl/lib/Net/Amazon/Property/Book.pm
    trunk/libnet-amazon-perl/t/001ASIN.t

Modified: trunk/libnet-amazon-perl/Changes
URL: http://svn.debian.org/wsvn/trunk/libnet-amazon-perl/Changes?rev=8833&op=diff
==============================================================================
--- trunk/libnet-amazon-perl/Changes (original)
+++ trunk/libnet-amazon-perl/Changes Sun Nov  4 13:54:56 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: trunk/libnet-amazon-perl/META.yml
URL: http://svn.debian.org/wsvn/trunk/libnet-amazon-perl/META.yml?rev=8833&op=diff
==============================================================================
--- trunk/libnet-amazon-perl/META.yml (original)
+++ trunk/libnet-amazon-perl/META.yml Sun Nov  4 13:54:56 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: trunk/libnet-amazon-perl/README
URL: http://svn.debian.org/wsvn/trunk/libnet-amazon-perl/README?rev=8833&op=diff
==============================================================================
--- trunk/libnet-amazon-perl/README (original)
+++ trunk/libnet-amazon-perl/README Sun Nov  4 13:54:56 2007
@@ -1,5 +1,5 @@
 ######################################################################
-    Net::Amazon 0.43
+    Net::Amazon 0.44
 ######################################################################
 NAME
     Net::Amazon - Framework for accessing amazon.com via REST

Modified: trunk/libnet-amazon-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libnet-amazon-perl/debian/changelog?rev=8833&op=diff
==============================================================================
--- trunk/libnet-amazon-perl/debian/changelog (original)
+++ trunk/libnet-amazon-perl/debian/changelog Sun Nov  4 13:54:56 2007
@@ -1,10 +1,11 @@
-libnet-amazon-perl (0.43-2) UNRELEASED; urgency=low
+libnet-amazon-perl (0.44-1) UNRELEASED; urgency=low
 
+  * New upstream release.
   * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser
     field (source stanza); Homepage field (source stanza). Removed:
     Homepage pseudo-field (Description); XS-Vcs-Svn fields.
 
- -- gregor herrmann <gregor+debian at comodo.priv.at>  Tue, 09 Oct 2007 22:30:54 +0200
+ -- gregor herrmann <gregor+debian at comodo.priv.at>  Sun, 04 Nov 2007 14:53:47 +0100
 
 libnet-amazon-perl (0.43-1) unstable; urgency=low
 

Modified: trunk/libnet-amazon-perl/lib/Net/Amazon.pm
URL: http://svn.debian.org/wsvn/trunk/libnet-amazon-perl/lib/Net/Amazon.pm?rev=8833&op=diff
==============================================================================
--- trunk/libnet-amazon-perl/lib/Net/Amazon.pm (original)
+++ trunk/libnet-amazon-perl/lib/Net/Amazon.pm Sun Nov  4 13:54:56 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: trunk/libnet-amazon-perl/lib/Net/Amazon/Property.pm
URL: http://svn.debian.org/wsvn/trunk/libnet-amazon-perl/lib/Net/Amazon/Property.pm?rev=8833&op=diff
==============================================================================
--- trunk/libnet-amazon-perl/lib/Net/Amazon/Property.pm (original)
+++ trunk/libnet-amazon-perl/lib/Net/Amazon/Property.pm Sun Nov  4 13:54:56 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: trunk/libnet-amazon-perl/lib/Net/Amazon/Property/Book.pm
URL: http://svn.debian.org/wsvn/trunk/libnet-amazon-perl/lib/Net/Amazon/Property/Book.pm?rev=8833&op=diff
==============================================================================
--- trunk/libnet-amazon-perl/lib/Net/Amazon/Property/Book.pm (original)
+++ trunk/libnet-amazon-perl/lib/Net/Amazon/Property/Book.pm Sun Nov  4 13:54:56 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: trunk/libnet-amazon-perl/t/001ASIN.t
URL: http://svn.debian.org/wsvn/trunk/libnet-amazon-perl/t/001ASIN.t?rev=8833&op=diff
==============================================================================
--- trunk/libnet-amazon-perl/t/001ASIN.t (original)
+++ trunk/libnet-amazon-perl/t/001ASIN.t Sun Nov  4 13:54:56 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