Mojo::Feed::Item::Enclosure - represents a file enclosure in an item from an RSS/Atom feed.
use Mojo::Feed; my $feed = Mojo::Feed->new("atom.xml"); my $item = $feed->items->first; print $item->title, $item->author, $item->published, "\n";
Mojo::Feed::Item::Enclosure is an Object wrapper for an enclosure from an RSS or Atom feed item.
Mojo::Feed::Item::Enclosure implements the following attributes.
Mime type of the enclosure file
Length of the enclosure payload
URL for downloading the enclosure content
Mojo::Feed::Item::Enclosure inherits all methods from Mojo::Base and adds the following ones:
my $hash = $enclosure->to_hash; print $hash->{url};
Return a hash reference representing the enclosure.
Return a XML serialized text of the enclosure's Mojo::DOM node. Note that this can be different from the original XML text in the feed.
Dotan Dimet
Mario Domgoergen
Copyright (C) Dotan Dimet.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Dotan Dimet <dotan@corky.net>
To install Mojo::Feed, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojo::Feed
CPAN shell
perl -MCPAN -e shell install Mojo::Feed
For more information on module installation, please visit the detailed CPAN module installation guide.