NAME

Net::CDDBScan - Http Interface to CDDB database

SYNOPSIS

use Net::CDDBScan;

# Create a new cddb object $cddb = Net::CDDBScan->new();

# get an array ref to a list of albums for a given artist $albums = $cddb->getalbums("skinny puppy");

# get an array ref to a list of songs for for all albums of a given artist $songs = $cddb->getsongs("http://www.cddb.com/xm/search?f=artist&q=portishead");

DESCRIPTION

Net::CDDBScan is an interface to the www.cddb.com website; or more specifically to their online search engine for the cddb database. Originally created as a small part of a greater application. This module allows you to take any existing string like "tricky" or "for whom the bell tolls" and get the artist name, all albums from said artist and all songs on ANY album said artist has ever worked on. This is assuming the cddb database has a record of the given artist/album/song.

USING Net::CDDBScan

Net::CDDBScan is an object oriented module.

1. Creating a Net::CDDBScan object

You first must create a Net::CDDBScan object.

my $cddb = Net::CDDBScan->new();

No existing options are available for the constructor. Plans are to add debug, continue, and other "not yet named" configuration options to the constructor.

2. Determining an Artist name based on an album or song name.

"Mezzanine" is the name of a Massive Attach album $artist = $cddb->getartist("mezzanine");

or

"Less Than Strangers" is the name of a song on a Tracy Chapman album $artist = $cddb->getartist("telling stories");

3. Getting a list of all albums for a given artist.
$albums = $cddb->getalbums("medusa");
print "$_\n" foreach @$albums;

getalbums() returns a reference to an array of album names. This function also takes any cddb.com url or partial url in the following formats:

http://www.cddb.com/xm/search?f=artist&q=medusa

www.cddb.com/xm/search?f=artist&q=medusa

medusa

The reason for taking all these types of urls/strings is based on the internal usage of this function. These formats are not planned to change. Though some of the internal usage may change feel free be expect all these formats the continue to be accepted.

4. Getting a list of all songs for all albums of a given artist.
$songs = $cddb->getsongs("cocteau twins");
print "$_\n" foreach $@songs;

This function also accepts all the url/string formats that getalbums() takes.

NOTICE

Be aware this module is in ALPHA stage. Big changes are expected which will allow much cleaner usage, much more functionality and caching of data to a local cddb database (optional). If you have any comments, suggestions and/or patches you'd like to submit. Please email me at dshultz@redchip.com

AUTHOR INFORMATION

Copyright 1998-2000, David J. Shultz All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Address bug reports and comments to: dshultz@redchip.com

BUGS

This section intentionally left blank.

SEE ALSO

This section intentionally left blank.