File Coverage

blib/lib/WebService/Audioscrobbler/SimilarUser.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::SimilarUser;
2 1     1   5 use warnings;
  1         1  
  1         22  
3 1     1   5 use strict;
  1         1  
  1         22  
4 1     1   4 use CLASS;
  1         1  
  1         5  
5            
6 1     1   28 use base 'WebService::Audioscrobbler::User';
  1         1  
  1         128  
7            
8             =head1 NAME
9            
10             WebService::Audioscrobbler::SimilarUser - 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 users.
23            
24             use WebService::Audioscrobbler;
25            
26             my $user = WebService::Audiocrobbler->user('Foo');
27            
28             for my $neighbour ($user->neighbours) {
29             print $neighbour->name . ": " . $neighbour->match . "\% similar\n";
30             }
31            
32             =head1 FIELDS
33            
34             =head2 C
35            
36             The related user from which this C object has been constructed from.
37            
38             =head2 C
39            
40             The similarity index between this user and the related user. 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::SimilarUser