Changeset 1731
- Timestamp:
- 10/10/06 22:17:42
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plagger/lib/Plagger/Plugin/Notify/UpdatePing.pm
r1696 r1731 22 22 23 23 my @args = (XMLRPC::Data->type(string => $feed->title), $feed->link); 24 my $method; 25 if ($self->conf->{extended_ping}) { 26 $method = 'weblogUpdates.extendedPing'; 27 push @args, $feed->count ? $feed->entries->[0]->permalink : $feed->link; 28 push @args, $feed->url; 29 push @args, join("|", map XMLRPC::Data->type(string => $_), @{ $feed->tags }) 30 if @{ $feed->tags }; 31 } else { 32 $method = 'weblogUpdates.ping'; 33 } 24 34 25 35 for my $url (@$urls) { 26 36 $context->log(info => "Ping " . $feed->link . " to $url"); 27 eval {28 XMLRPC::Lite->new->proxy($url)->call( 'weblogUpdates.ping', @args);37 my $res = eval { 38 XMLRPC::Lite->new->proxy($url)->call($method, @args)->result; 29 39 }; 30 if ( $@) {31 $context->log(error => "Error sending UpdatePing: $ @");40 if (my $err = $@ || $res->{flerror}) { 41 $context->log(error => "Error sending UpdatePing: $err"); 32 42 } 33 43 } … … 52 62 This plugin notifies feed updates to update ping servers using XML-RPC. 53 63 64 =head1 CONFIG 65 66 =over 4 67 68 =item extended_ping 69 70 extended_ping: 1 71 72 Whether to use I<weblogUpdates.extendedPing> method for extra 73 information. Defaults to 0. 74 75 =back 76 54 77 =head1 AUTHOR 55 78
