NAME
App::FeedDeduplicator::Aggregator - Aggregator class for App::FeedDeduplicator
DESCRIPTION
This module is part of the App::FeedDeduplicator application. It is responsible for aggregating feeds from multiple sources.
It fetches the feeds using LWP::UserAgent and parses them using XML::Feed. The aggregated entries are stored in an array for further processing.
It is designed to be used in conjunction with the Deduplicator and Publisher classes to provide a complete feed deduplication and publishing solution.
SYNOPSIS
use App::FeedDeduplicator::Aggregator;
my $aggregator = App::FeedDeduplicator::Aggregator->new(
feeds => [{
name => 'Feed 1',
feed => 'http://example.com/feed1',
web => 'http://example.com',
}, {
name => 'Feed 2',
feed => 'http://example.com/feed2',
web => 'http://example.com',
}],
ua => LWP::UserAgent->new(),
);
$aggregator->aggregate();
METHODS
new
Creates a new instance of App::FeedDeduplicator::Aggregator. The constructor accepts a list of feeds and a user agent as parameters.
The feeds should be an array reference containing hash references with the keys 'name', 'feed', and 'web'.
The user agent should be an instance of LWP::UserAgent.
aggregate
The main method that aggregates feeds from the specified sources. It fetches each feed using the provided user agent and parses it using XML::Feed.
It stores the aggregated entries in an array for further processing. The entries are stored as hash references containing the entry and the corresponding feed information.
AUTHOR
Dave Cross <dave@perlhacks.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2025 Magnum Solutions Ltd. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://dev.perl.org/licenses/artistic.html for more details.