AmphetaDesk::Channels.pm - Parses and returns our syndicated feeds.
$channel_object = load_channel( $channel_xml, $channel_url );
This package contains all the various functions that read our different flavors of RSS or scriptingNews. It's pretty crucial to happy operation. It uses XML::Simple (benchmarked as being about three times faster than XML::RSS) to do pretty much everything, and returns a parsed tree similar to RSS 1.0 (regardless of what format was actually parsed).
If an error occurs during the channel loading, we fake an RSS 1.0 tree with a single item: that of the error message. It's cheap, it's not ideal, but hey, it works fluidly, so there are no plans to change it.
$channel_xml, determines if it's a filename or just plain xml, and returns a common data structure, regardless of the underlying xml spec. It'll also modify all internal links to user preference via AmphetaDesk::Utilities::add_link_targets.
$channel_xml. If this is passed, it's used to correlate the
$channel_xmlwith a "My Channels" subscription (determined by the URL). This allows us to update our subscription information with any new data received from a good parse (with AmphetaDesk::MyChannels's
$datastructure that closely represents an RSS 1.0 tree, regardless of what syndication format was actually parsed. You can examine the tree by using Data::Dumper.
Morbus Iff, <firstname.lastname@example.org>
Copyright 2000-2004 Morbus Iff <email@example.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.