XML::Atom::Feed::JavaScript - Atom syndication with JavaScript
## get an Atom feed from the network use XML::Atom::Client use XML::Atom::Feed::JavaScript; my $client = XML::Atom::Client->new(); my $feed = $client->getFeed( 'http://example.com/atom.xml' ); print $feed->asJavascript(); ## or get an atom feed from disk use XML::Atom::Feed::JavaScript; my $feed = XML::Atom::Feed->new( Stream => 'atom.xml' ); print $feed->asJavascript();
XML::Atom::Feed::JavaScript exports an additional function into the XML::Atom package for outputting Atom feeds as javascript.
Returns a XML::Atom::Feed object as a string of JavaScript code. If you want to limit the amount of entries you can pass in an integer argument:
## limit to first 10 entries my $javascript = $feed->asJavascript( 10 );
To install XML::Atom::Feed::JavaScript, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::Atom::Feed::JavaScript
CPAN shell
perl -MCPAN -e shell install XML::Atom::Feed::JavaScript
For more information on module installation, please visit the detailed CPAN module installation guide.