AnyEvent-Superfeedr

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

        - Fixes a problem where notifications would always be empty
          Apparently Superfeedr changed some XML namespaces
        - Other minor cleanups

0.02  Wed Aug 5 15:55:00 2009
        Some non backward compatible changes:
        - Enabled bulk subscription with one subscribe()
          call (Tatsuhiko Miyagawa)
        - Allows callback to subscribe and unsubscribe. (Tatsuhiko Miyagawa)
        - Removed subscription/unsubscription options in favor of user's own
          timer (Tatsuhiko Miyagawa)

0.01  Fri Jul 24 21:58:34 2009
        - Initial version that doesn't do much

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

  AnyEvent->condvar->recv;

  # Subsribe upon connection
  my $superfeedr = AnyEvent::Superfeedr->new(
      jid => $jid,
      password => $password,
  );
  $superfeedr->connect(sub { $superfeedr->subscribe($feed_uri) });

  # Periodically fetch new URLs from database and subscribe
  my $timer = AnyEvent->timer(
      after => 5,
      interval => 5 * 60,
      cb => sub {
          my @new_feeds = get_new_feeds_from_database() or return;
          $superfeedr->subscribe(@new_feeds);
      },
  );

  $end->recv;



( run in 1.093 second using v1.01-cache-2.11-cpan-49f99fa48dc )