ZConf::RSS - ZConf backed RSS fetching.
Version 2.2.0
use ZConf::RSS; my $zcrss = ZConf::RSS->new(); ...
This initializes it.
One arguement is taken and that is a hash value.
This is the a ZConf object. If not passed, another one will be created.
my $zcrss=ZConf::RSS->new(); if($zcrss->{error}){ print "Error!\n"; }
This makes sure a specified template exists.
my $returned=$zcrss->feedExists('someFeed'); if($zcw->{error}){ print "Error!\n"; }else{ if($returned){ print "It exists.\n"; } }
This removes a feed.
One arguement is required and that is the name of the feed.
$zcrss->delFeed('someFeed'); if($self->{error}){ print "Error!\n"; }
This removes a template.
One arguement is taken and it is the template name.
$zcrss->delTemplate('someTemplate'); if($zcrss->{error}){ print "Error!\n"; }
This creates a 'XML::FeedPP' object based on a feed.
One arguement is taken and it is the name of the feed.
my $feedobj=$zcrss->getFeed; if($zcrss->{error}){ print "Error!\n"; }
This fetches the arguements for the feed.
my %args=$zcrss->getFeedArgs('someFeed'); if($zcrss->{error}){ print "Error!\n"; }
This fetches a feed, processes it using the specified templates and returns a string.
my $string=$zcrss->getFeedAsTemplatedString('someFeed'); if($zcrss->{error}){ print "Error!\n"; }
This gets what the current set is.
my $set=$zcrss->getSet; if($zcrss->{error}){ print "Error!\n"; }
This returns a template as a string.
my $template=$zcrss->getTemplate('some/template'); if ($zcrss->{error}) { print "Error!\n"; }
This initializes it or a new set.
If the specified set already exists, it will be reset.
One arguement is required and it is the name of the set. If it is not defined, ZConf will use the default one.
#creates a new set named foo $zcw->init('foo'); if($zcrss->{error}){ print "Error!\n"; } #creates a new set with ZConf choosing it's name $zcrss->init(); if($zcrss->{error}){ print "Error!\n"; }
This lists the available feeds.
my @feeds=$zcrss->listFeeds(); if($zcrss->{error}){ print "Error!\n"; }
This lists the available sets.
my @sets=$zcrss->listSets; if($zcrss->{error}){ print "Error!"; }
This gets a list of available templates.
my @templates=$zcrss->listTemplates; if($zcrss->{error}){ print "Error!\n"; }
This reads a specific set. If the set specified is undef, the default set is read.
#read the default set $zcrss->readSet(); if($zcrss->{error}){ print "Error!\n"; } #read the set 'someSet' $zcrss->readSet('someSet'); if($zcrss->{error}){ print "Error!\n"; }
This adds a new feed or modifies a existing one.
One arguement is taken and it is a hash.
This the feed to be added.
This is the name to use for it.
This is the name of the top template to use.
This is the name of the template that will be used for each item.
This is the name of the bottom template to use.
$zcrss->setFeed({ feed=>'http://foo.bar/rss.xml', name=>'Foo Bar', topTemplate=>'defaultTop', itemTemplate=>'defaultItem', bottomTemplate=>'defaultBottom', }); if($zrss->{error}){ print "Error!\n"; }
This sets a specified template to the given value.
$zcrss->setTemplate($templateName, $template); if ($zcw->{error}) { print "Error!\n"; }
my $returned=$zcrss->templateExists('someTemplate'); if($zcw->{error}){ print "Error!\n"; }else{ if($returned){ print "It exists.\n"; } }
This blanks the error storage and is only meant for internal usage.
It does the following.
$self->{error}=undef; $self->{errorString}="";
The templating system used is 'Text::NeatTemplate'. The varialbes are as below.
This is the title for the channel.
This is the description for the channel.
This is the publication date for the channel.
This is the copyright info for the channel.
This is the link for the channel.
This is the language for the channel.
This is the image for the channel.
This is the title for a item.
This is the description for a item.
This is the description for a item that has been has been formated with 'HTML::FormatText::WithLinks'
This is the date published for a item.
This is the category for a item.
This is the author for a item.
This is the item's guid element.
This is the link for a item.
Channel: {$ctitle} Date: {$cpubdate} Language: {$clang} Copywright: {$ccopyright} Link: {$clink} {$cdesc}
-------------------------------------------------------------------------------- Title: {$ititle} Date: {$ipubdate} Author: {$iauthor} Category: {$icat} Link: {$ilink} {$idescFTWL}
This one is blank by default.
Could not initialize ZConf.
ZConf error.
Missing required arguement.
Feed name can't match /\//.
Feed does not exist.
Feed not defined.
Failed to load feed.
Zane C. Bowers, <vvelox at vvelox.net>
<vvelox at vvelox.net>
Please report any bugs or feature requests to bug-zconf-rss at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ZConf-RSS. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-zconf-rss at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc ZConf::RSS
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=ZConf-RSS
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/ZConf-RSS
CPAN Ratings
http://cpanratings.perl.org/d/ZConf-RSS
Search CPAN
http://search.cpan.org/dist/ZConf-RSS
Copyright 2009 Zane C. Bowers, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install ZConf::RSS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ZConf::RSS
CPAN shell
perl -MCPAN -e shell install ZConf::RSS
For more information on module installation, please visit the detailed CPAN module installation guide.