AnyEvent-Superfeedr

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Perl extension AnyEvent::Superfeedr

0.04 Tue Mar 23 14:50:17 2010
        - Fixed Atom namespace in <feed> and added <title> and <updated> in $n->as_xml (miyagawa)
        - Added $notification->title attribute

0.03
        - [incompatible] change arguments of on_connect() (pass $superfeedr)
        - [incompatible] adds an explicit ->connect() that you have to call now
        - Fix an error reported by Tatsuhiko Miyagawa with connect errors
        - Adds $notification->as_xml
        - Fixes a problem where notifications would always be empty
          Apparently Superfeedr changed some XML namespaces
        - Other minor cleanups

lib/AnyEvent/Superfeedr/Notification.pm  view on Meta::CPAN

    my $notification = shift;
    my $id = $notification->tagify;
    my $feed_uri = _xml_encode($notification->feed_uri);
    my $title    = _xml_encode($notification->title);
    my $now      = _now_as_w3c();
    my $feed = <<EOX;
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>$id</id>
<title>$title</title>
<updated>$now</updated>
<link href="$feed_uri" rel="self" />
EOX
    for my $node_entry ($notification->node_entries) {
        $feed .= $node_entry->as_string;
    }
    $feed .= "</feed>";
    return $feed;
}

sub _now_as_w3c {



( run in 0.274 second using v1.01-cache-2.11-cpan-0a6323c29d9 )