![]() |
![]() |
||||||
|
|||||||
POD documentation > Web Protocols > RSS.pm posted on 3:24 PM, July 12, 2009
RSS.pm
All-purpose simple RSS feed generator.
Usage:Create the feed (the channel descriptors are accepted without validation, so you must ensure they are correct):
my $rss = new ExSite::RSS(title=>"My Feed",description=>"foo",link=>"http://myfeed.com/";);
You can also specify channel descriptors separately. This is slightly better, because the parameters are validated and made XML-friendly.
my $rss = new ExSite::RSS;
$rss->title("My Feed");
$rss->description("foo");
$rss->link("http://myfeed.com/";);
Add items to the feed. The parameters are title, description, link.
$rss->item("1st Title","1st description","http://myfeed.com/1";);
$rss->item("2nd Title","2nd description","http://myfeed.com/2";);
$rss->item("3rd Title","3rd description","http://myfeed.com/3";);
Output the feed:
print $rss->write;
Clear the feed so you can start over:
$rss->clear; |
Recent ArticlesDocumentation Topicsbest practices (5)
content management (12)
data handling (7)
fundamentals (3)
google (5)
graphic design (21)
html formatting (7)
IT (9)
plug-in modules (28)
POD (32)
programming (48)
RSS (3)
security (3)
SEO (3)
visual tutorial (29)
web protocols (9)
|