Audioscrobbler/SimilarUser.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 19 / 19 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Audioscrobbler/SimilarArtist.pm ↑ Summary
1 package WebService::Audioscrobbler::SimilarUser;
2 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use CLASS;
Subroutine BEGIN: called CC=1 SCAR=0.0
5
6 2 ▶use base 'WebService::Audioscrobbler::User';
Subroutine BEGIN: called CC=1 SCAR=0.0
7
8 =head1 NAME
9
10 WebService::Audioscrobbler::SimilarUser - An object-oriented interface to the Audioscrobbler WebService API
11
12 =cut
13
14 2 our $VERSION = '0.07';
15
16 # object accessors
17 2 CLASS->mk_accessors(qw/match related_to/);
18
19 =head1 SYNOPSIS
20
21 This is a subclass of L<WebService::Audioscrobbler::User> 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<related_to>
35
36 The related user from which this C<SimilarUser> object has been constructed from.
37
38 =head2 C<match>
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<< <nilsonsfj at cpan.org> >>
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 2 1; # End of WebService::Audioscrobbler::SimilarUser
« Audioscrobbler/SimilarArtist.pm ↑ Summary