Acme-NoTalentAssClown
view release on metacpan or search on metacpan
lib/Acme/NoTalentAssClown.pm view on Meta::CPAN
}
=head1 NAME
Acme::NoTalentAssClown - Get some Bolton Lyrics!
=head1 VERSION
Version 0.01
=head1 SYNOPSIS
use Acme::NoTalentAssClown;
#Defaults to use Lyrics::Fetcher::Google, but any Lyrics::Fetcher
#plugin will work as specified by agent=>'bar'
my $nta = Acme::NoTalentAssClown->new(gid=>'yourGoogleApi_ID');
print $nta->grammys(); #finds a greatest hit
print $nta->grammys('When a Man Loves a Woman'); #For my money, it doesn't get any better
...
=head1 METHODS
=over 4
=item new
Initializes Acme::NoTalentAssClown and loads lyric loader depending on agent
=item grammys
Returns the result of a search for a random greatest hit, or a hit you specify
=back
=cut
our $VERSION = '0.01';
sub grammys {
my $self = shift;
my ($suggestion) = @_;
$suggestion ||=
$self->{entire_collection}
[ rand( scalar( @{ $self->{entire_collection} } ) ) ];
return Lyrics::Fetcher->fetch(
$suggestion,
"Michael Bolton",
$self->{agent} || "Google"
);
}
=head1 AUTHOR
John Lifsey, C<< <nebulous@crashed.net> >>
=head1 BUGS
I'm sure there are plenty of bugs.
But why should I change it?
He's the one who sucks.
Please report any bugs or feature requests to
C<bug-acme-notalentassclown@rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Acme-NoTalentAssClown>.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
=head1 COPYRIGHT & LICENSE
Copyright 2005 John Lifsey, all rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=cut
1; # End of Acme::NoTalentAssClown
( run in 1.040 second using v1.01-cache-2.11-cpan-b16cb0d3907 )