Catmandu::Importer::Atom(3pm) | User Contributed Perl Documentation | Catmandu::Importer::Atom(3pm) |
Catmandu::Importer::Atom - Package that imports Atom feeds
use Catmandu::Importer::Atom; my $importer = Catmandu::Importer::Atom->new(url => "..."); my $n = $importer->each(sub { my $hashref = $_[0]; # ... });
Each parsed Atom entry is transformed into a hash ref:
{ id => '...' , title => '...' , published => '...' , updated => '...' , summary => '...' , rights => '...' , content => { mode => '...' , type => '...' , body => '...' , } , author => { name => '...' , email => '...' , uri => '...' , homepage => '...' , } , contributor => { name => '...' , email => '...' , uri => '...' , homepage => '...' , } , category => [ { term => '...' , label => '...' , scheme => '....' } , ], link => [ { rel => '...' , href => '...' , hreflang => '...' , title => '...' , type => '...' , length => '...'} , ], <<all other elements are added as name-value pairs>> }
Create a new Atom importer for the URL. Optionally provide a entries parameter with the feed items you want to import.
Every Catmandu::Importer is a Catmandu::Iterable all its methods are inherited. The Catmandu::Importer::Atom methods are not idempotent: Atom feeds can only be read once.
Catmandu::Iterable
2020-04-01 | perl v5.30.0 |