| Feed-Source-Yahoo documentation | Contained in the Feed-Source-Yahoo distribution. |
Feed::Source::Yahoo - Create a RSS feed based on a Yahoo query
Version 0.01
If you query Yahoo regurlarly with the same search, maybe is it a good idea to transform this query in a RSS feed. This simple module can help you :
use Feed::Source::Yahoo;
my $feed = Feed::Source::Yahoo->new( query => '"information retrieval"');
print "The feed URL: " . $feed->url() . "\n";
Emmanuel Di Pretoro, <<manu at bjornoya.net>>
Please report any bugs or feature requests to
bug-feed-source-yahoo at rt.cpan.org, or through the web interface at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Feed-Source-Yahoo.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Feed::Source::Yahoo
You can also look for information at:
Copyright 2006 Manu, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Feed-Source-Yahoo documentation | Contained in the Feed-Source-Yahoo distribution. |
package Feed::Source::Yahoo; use warnings; use strict; use Carp; use URI; use constant { URL => "http://api.search.yahoo.com/WebSearchService/rss/webSearch.xml", };
our $VERSION = '0.01';
sub new { my ($class, %arg) = @_; my $self = {}; $self->{URI} = URI->new(URL); $self->{params}{appid} = "yahoosearchwebrss"; $self->{params}{query} = $arg{query} if exists $arg{query}; bless $self, $class; }
sub url { my ($self) = @_; if (exists $self->{params}{query}) { $self->{URI}->query_form($self->{params}); $self->{URI}->as_string } else { croak "You must specify a query..."; } }
sub query { my $self = shift; $self->{params}{query} = shift if @_; }
1; # End of Feed::Source::Yahoo