Subject: | code snippet to add enclosure support |
add inside as_rss_2_0:
if (my $e = $item->{enclosure})
{
$output .= '<enclosure '
. join(' ', map {qq($_=").$self->encode($$e{$_}).qq(")} $
. '/>' . "\n";
}
and can be used like so:
$rss->add_item(
title => $rec{title},
description => $rec->{description},
enclosure => { url=>$rec->{url}, type=>"application/x-bittorrent" },
);