意外にBuggyなNet::Amazon
PerlでAmazon APIを使うNet::Amazonモジュールの話。
Net::Amazonでは、Amazonストアでの種別(本とかCDとか)別にプロパティクラス(Net::Amazon::Property::*)があるんだけど、現状では
- Book
- CE
- DVD
- Music
- Software
- VideoGames
— Property.pm 2007-03-19 20:30:27.000000000 +0900 \***\***\***\***\*** \*\\*\* 30,36 \*\*** OurPrice => [qw(Offers Offer OfferListing Price FormattedPrice)], SmallImageUrl => [qw(SmallImage URL)], SuperSaverShipping => [qw(Offers Offer OfferListing IsEligibleForSuperSave rShipping)], ! Title => [qw(Title)], ThirdPartyNewCount => [qw(OfferSummary TotalNew)], ThirdPartyNewPrice => [qw(OfferSummary LowestNewPrice FormattedPrice)], TotalOffers => [qw(Offers TotalOffers)], — 30,36 —- OurPrice => [qw(Offers Offer OfferListing Price FormattedPrice)], SmallImageUrl => [qw(SmallImage URL)], SuperSaverShipping => [qw(Offers Offer OfferListing IsEligibleForSuperSave rShipping)], ! Title => [qw(ItemAttributes Title)], ThirdPartyNewCount => [qw(OfferSummary TotalNew)], ThirdPartyNewPrice => [qw(OfferSummary LowestNewPrice FormattedPrice)], TotalOffers => [qw(Offers TotalOffers)], \***\***\***\***\*** \*\\*\* 47,53 \*\*** ‘Asin’ => ‘ASIN’, ‘url’ => ‘DetailPageURL’, ‘Media’ => ‘Binding’, ! ‘ProductName’ => ‘title’, ); \_\_PACKAGE\_\_->make\_accessor($\_) for @DEFAULT_ATTRIBUTES; — 47,53 —- ‘Asin’ => ‘ASIN’, ‘url’ => ‘DetailPageURL’, ‘Media’ => ‘Binding’, ! ‘ProductName’ => ‘Title’, ); \_\_PACKAGE\_\_->make\_accessor($\_) for @DEFAULT_ATTRIBUTES; \***\***\***\***\*** \*\\*\* 163,168 \*\*** — 163,169 —- # die “%Error: there is no property defined for type ‘$catalog’\n”; DEBUG(“Creating new Default Property ($catalog)”); $obj = Net::Amazon::Property->new(xmlref => $xmlref); + $obj->init\_via\_xmlref( $xmlref ); } return $obj; ~ # 追記@3/20 2:00。誤字修正。*** Property.pm.org 2007-03-15 01:25:47.000000000 +0900