| 1 | package WebService::Audioscrobbler::SimilarArtist; | ||
| 2 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use CLASS; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 1 | ▶ | use base 'WebService::Audioscrobbler::Artist'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | =head1 NAME | ||
| 9 | |||
| 10 | WebService::Audioscrobbler::SimilarArtist - An object-oriented interface to the Audioscrobbler WebService API | ||
| 11 | |||
| 12 | =cut | ||
| 13 | |||
| 14 | 1 | our $VERSION = '0.08'; | |
| 15 | |||
| 16 | # object accessors | ||
| 17 | 1 | CLASS->mk_accessors(qw/match related_to/); | |
| 18 | |||
| 19 | =head1 SYNOPSIS | ||
| 20 | |||
| 21 | This is a subclass of L<WebService::Audioscrobbler::Artist> which implements some | ||
| 22 | aditional fields that cover similarity aspects between two artists. | ||
| 23 | |||
| 24 | use WebService::Audioscrobbler; | ||
| 25 | |||
| 26 | my $artist = WebService::Audiocrobbler->artist('Foo'); | ||
| 27 | |||
| 28 | for my $similar ($artist->similar_artists) { | ||
| 29 | print $similar->name . ": " . $similar->match . "\% similar\n"; | ||
| 30 | } | ||
| 31 | |||
| 32 | =head1 FIELDS | ||
| 33 | |||
| 34 | =head2 C<related_to> | ||
| 35 | |||
| 36 | The related artist from which this C<SimilarArtist> object has been constructed from. | ||
| 37 | |||
| 38 | =head2 C<match> | ||
| 39 | |||
| 40 | The similarity index between this artist and the related artist. It's returned | ||
| 41 | as a number between 0 (not similar) and 100 (very similar). | ||
| 42 | |||
| 43 | =cut | ||
| 44 | |||
| 45 | =head1 AUTHOR | ||
| 46 | |||
| 47 | Nilson Santos Figueiredo Junior, C<< <nilsonsfj at cpan.org> >> | ||
| 48 | |||
| 49 | =head1 COPYRIGHT & LICENSE | ||
| 50 | |||
| 51 | Copyright 2006-2007 Nilson Santos Figueiredo Junior, all rights reserved. | ||
| 52 | |||
| 53 | This program is free software; you can redistribute it and/or modify it | ||
| 54 | under the same terms as Perl itself. | ||
| 55 | |||
| 56 | =cut | ||
| 57 | |||
| 58 | 1 | 1; # End of WebService::Audioscrobbler::SimilarArtist | |