
XML::RAI::Enclosure - An extension to XML::RAI adding enclosure support

A subclass of XML::RAI::Object, XML::RAI::Enclosure handles the mapping function and retrieval of RSS channel elements.

use XML::RAI;
use XML::RAI::Enclosure;
my $rai = XML::RAI->parse($feed_xml);
for my $i (@{$rai->items}) {
print $i->title,"\n" ;
for my $e (XML::RAI::Enclosure->load($i)) {
print $e->url, "\n";
print $e->length, "\n";
print $e->type, "\n";
}
}

A class method that accepts an XML::RAI::Item and returns a list of XML::RAI::Enclosures.
An object method that returns the XML::RSS::Parser::Element that the object is using as its source.
An object method that returns the parent of the RAI object.
An object method that returns the enclosure URL attribute.
An object method that returns the enclosure length attribute.
An object method that returns the enclosure type attribute. For example: 'audio/mpeg'

Josh McAdams <joshua dot mcadams at gmail dot com> created this extension and released it under the GPL.