NAME

WWW::CDBaby - Automate interaction with cdbaby.com!

VERSION

Version 0.01

SYNOPSIS

my $cdbaby = new WWW::CDBaby( "$account_name", "$password" );

# Print the name of the first person who bought your CD
my ( @sales ) $cdbaby->get_cd_sales( $album_id );
print $sales[0]->{'name'};

METHODS

get_cd_sales( album_id )

Pass this method the URL of your album. If you can see your album at "cdbaby.com/amberg", your album_id is "amberg".

It returns an array of hashrefs containing all your physical album sales. Digital sales are tracked separately.

This method gets the text-delimited file you get if you log into members.cdbaby.com, click "Accounting", click the "$ sold" amount next to the album name, and click the "download your sales in a tab-delimited text file" link. See how much easier this method is? ;-)

use WWW::CDBaby;

my $cdbaby = new WWW::CDBaby;

my ( @sales ) = $cdbaby->get_sales( $album_id );

my $total=0;
foreach $sale ( @sales ) {
    $total += $sale->{'paid_to_you'};
}

print "Total profits: \$$total\n";

AUTHOR

Grant Grueninger, <grantg at cpan.org>

BUGS

Please report any bugs or feature requests to bug-www-cdbaby at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-CDBaby. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc WWW::CDBaby

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2007 Grant Grueninger, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.