
XML::Feed::JavaScript - Serialize XML feeds as JavaScript

use XML::Feed::JavaScript;
my $feed = XML::Feedi::JavaScript->parse(URI->new('http://example.com/atom.xml'))
or die XML::Feed::JavaScript->errstr;
print $feed->as_javascript;

XML::Feed::JavaScript allows you to serialize XML feeds as JavaScript by using XML::Feed syndication feed parser for both RSS and Atom feeds.
XML::Feed::JavaScript supports Perl version 5.6.1 or later.

print $feed->as_javascript({
max => $max,
encoding => $encoding,
tmpl_opt => {
filename => $filename,
die_on_bad_params => 0,
},
});
Limit the maximum of entries.
Pass in the encoding you wish to get JavaScript by. If not passed in, default value 'utf8' will be set. See the documentation of Encode for more detail.
Set the options for HTML::Template, but as hashref. See the documentation of HTML::Template for more detail.
Pass in the filename you wish to save your JavaScript in. Optionally you can pass in $opt in the same manner as as_javascript() above.


Kentaro Kuribayashi, <kentarok@gmail.com>

Copyright (C) 2005 by Kentaro Kuribayashi
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.