File Coverage

blib/lib/WebService/Audioscrobbler/SimilarArtist.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1             package WebService::Audioscrobbler::SimilarArtist;
2 1     1   4 use warnings;
  1         2  
  1         22  
3 1     1   3 use strict;
  1         2  
  1         21  
4 1     1   4 use CLASS;
  1         1  
  1         4  
5            
6 1     1   35 use base 'WebService::Audioscrobbler::Artist';
  1         1  
  1         100  
7            
8             =head1 NAME
9            
10             WebService::Audioscrobbler::SimilarArtist - An object-oriented interface to the Audioscrobbler WebService API
11            
12             =cut
13            
14             our $VERSION = '0.07';
15            
16             # object accessors
17             CLASS->mk_accessors(qw/match related_to/);
18            
19             =head1 SYNOPSIS
20            
21             This is a subclass of L 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
35            
36             The related artist from which this C object has been constructed from.
37            
38             =head2 C
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 Júnior, C<< >>
48            
49             =head1 COPYRIGHT & LICENSE
50            
51             Copyright 2006-2007 Nilson Santos Figueiredo Júnior, 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; # End of WebService::Audioscrobbler::SimilarArtist