NAME

XML::Atom::Feed::JavaScript - Atom syndication with JavaScript

SYNOPSIS

## 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();

DESCRIPTION

XML::Atom::Feed::JavaScript exports an additional function into the XML::Atom package for outputting Atom feeds as javascript.

FUNCTIONS

asJavascript()

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 );

AUTHORS

David Jacobs <globaldj@mac.com>
Ed Summers <ehs@pobox.com>
Brian Cassidy <bricas@cpan.org>