File: MusicBrainz.pm

package info (click to toggle)
libwebservice-musicbrainz-perl 0.93-1
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 316 kB
  • ctags: 116
  • sloc: perl: 1,023; makefile: 46
file content (103 lines) | stat: -rw-r--r-- 1,750 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
package WebService::MusicBrainz;

use strict;

our $VERSION = '0.93';

=head1 NAME

WebService::MusicBrainz

=head1 SYNOPSIS

    use WebService::MusicBrainz;

    my $artist_ws = WebService::MusicBrainz->new_artist();
    my $track_ws = WebService::MusicBrainz->new_track();
    my $release_ws = WebService::MusicBrainz->new_release();
    my $label_ws = WebService::MusicBrainz->new_label();

=head1 DESCRIPTION

This module will act as a factory using static methods to return specific web service objects;

=head1 METHODS

=head2 new_artist()

Return new instance of WebService::MusicBrainz::Artist object.

=cut

sub new_artist {
   my $class = shift;

   require WebService::MusicBrainz::Artist;

   return WebService::MusicBrainz::Artist->new();
}

=head2 new_track

Return new instance of WebService::MusicBrainz::Track object.

=cut 

sub new_track {
   my $class = shift;

   require WebService::MusicBrainz::Track;

   return WebService::MusicBrainz::Track->new();
}

=head2 new_release

Return new instance of WebService::MusicBrainz::Release object.

=cut 

sub new_release {
   my $class = shift;

   require WebService::MusicBrainz::Release;

   return WebService::MusicBrainz::Release->new();
}

=head2 new_release

Return new instance of WebService::MusicBrainz::Label object.

=cut 

sub new_label {
   my $class = shift;

   require WebService::MusicBrainz::Label;

   return WebService::MusicBrainz::Label->new();
}

=head1 AUTHOR

=over 4

=item Bob Faist <bob.faist@gmail.com>

=back

=head1 COPYRIGHT AND LICENSE

Copyright 2006-2007 by Bob Faist

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

=head1 SEE ALSO

http://wiki.musicbrainz.org/XMLWebService

=cut

1;