Net::Am...::Music(3)
πΏ NAME πΏ
okay so bestie, Net::Amazon::Property::Music is the whole vibe β it's the class for pop CDs on amazon.com π it's a page from the User Contributed Perl Documentation collection, and it's giving "i know exactly what a compact disc is and i will tell you everything about it" β¨
πΈ SYNOPSIS πΈ
like, here's the moment you've been waiting for:
use Net::Amazon;
# ...
if($resp->is_success()) {
for my $prop ($resp->properties) {
print join("/", $_->artists(), " ",
$_->album(), " ",
$_->label(), " ",
$_->year(), " ";
$_->upc(), " ";
$_->media(), " ";
$_->nummedia(), "\n";
}
no cap, that's the whole flex π
π¦ DESCRIPTION π¦
so Net::Amazon::Property::Music is derived from Net::Amazon::Property β it inherits all the base class's all-purpose methods (iconic behavior, honestly), and on top of that it hands you specialized accessors for all the popular music CD parameters π
β¨ METHODS β¨
artists()
returns a list of the CD's artists π and there's also an artist() method β lowercase, singular, main character energy β which just returns the first artist. one artist. the one. periodt.
tracks()
returns a list of the CD's track titles π΅ the tracks are ordered exactly as they appear on the media, so track one lives at offset zero in the tracks() list, fr fr. if there are multiple media, the tracks just get appended to the same list β and ngl, there's currently no way to figure out which track belongs to which media π (Amazon does return these data, but Net::Amazon doesn't use it. tragic.)
label()
returns the music label as a string π·οΈ
album()
returns the CD's title as a string π
upc()
returns the CD's UPC as a string π’
media()
returns the CD's media type as a string πΎ
nummedia()
returns the CD's number of media (i.e. number of discs) as a string π₯ and listen β Amazon doesn't always send this back, so if you get undef, just assume it's 1. that's the rule, bestie π«Ά
new(xmlref => $xmlref)
initializes an object by passing a hash of hashes structure containing the XML data returned from the service π§ usually this is just Net::Amazon doing its thing internally, initializing objects for on backcoming data. you probably won't call this yourself, iykyk π
π‘ ok one more thing β go check outNet::Amazon::Propertyfor all-purpose accessors, likeyear,OurPrice,ListPrice, etc. it's the mothership. this page is the pop-CD-specific little sister π
π AUTHOR π
Mike Schilli, <m@perlmeister.com> β king behavior, honestly π
π THANKS π
Thanks to Padraic Renaghan <padraic@renaghan.com<gt> for adding the upc/media/nummedia fields π not all heroes wear capes!!
β COPYRIGHT AND LICENSE β
Copyright 2003 by Mike Schilli <m@perlmeister.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. slay π
and that's the whole thing!! this page ships with perl v5.42.0 and it was last touched on 2025-07-25 β so yeah, Net::Am...::Music(3), that's her π
β¨ bye bestie, go read some CD metadata ππ
π¦ where this page comes from
- fedora 43: perl-Net-Amazon 0.62-35.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms