Skip Menu |

This queue is for tickets about the Net-TrackBack CPAN distribution.

Report information
The Basics
Id: 14932
Status: new
Priority: 0/
Queue: Net-TrackBack

People
Owner: Nobody in particular
Requestors: mailtojohn [...] mail.ru
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: small bug in Net::Trackback
There are 2 small but imortant bugs in these 2 files: Trackback/Ping.pm and Trackback/Message.pm 1. Trackback/Ping.pm Method for setting up trackback id for ping is "id". So, we have "id=..." string in query string. But in "parse" method we get trackback id by $q->param("tb_id"), not $q->param("id"). 2. Trackback/Message.pm "parse" function returns object, created with "message" param. In "to_xml" and "message" methods "msg" is used. Must be "message" too. "diff -ruN ..." file is attached. Best regards, Evgeny Makarov
diff -ruN Trackback/Message.pm new/Message.pm --- Trackback/Message.pm 2004-12-24 17:33:21.000000000 +0300 +++ new/Message.pm 2005-10-05 14:54:14.000000000 +0400 @@ -29,7 +29,7 @@ sub to_xml { my $self = shift; my $code = $self->{__stash}->{code} || 0; - my $msg = encode_xml($self->{__stash}->{msg}) || ''; + my $msg = encode_xml($self->{__stash}->{message}) || ''; my $xml = <<MESSAGE; <?xml version="1.0" encoding="iso-8859-1"?> <response> @@ -41,7 +41,7 @@ } sub code { $_[0]->{__stash}->{code} = $_[1] if $_[1]; $_[0]->{__stash}->{code}; } -sub message { $_[0]->{__stash}->{msg} = $_[1] if $_[1]; $_[0]->{__stash}->{msg}; } +sub message { $_[0]->{__stash}->{message} = $_[1] if $_[1]; $_[0]->{__stash}->{message}; } sub is_success { !$_[0]->{__stash}->{code} } sub is_error { $_[0]->{__stash}->{code} } @@ -145,4 +145,4 @@ =cut -=end \ No newline at end of file +=end diff -ruN Trackback/Ping.pm new/Ping.pm --- Trackback/Ping.pm 2004-12-24 17:33:21.000000000 +0300 +++ new/Ping.pm 2005-10-05 14:57:17.000000000 +0400 @@ -19,7 +19,7 @@ sub parse { my $class = shift; my $q = shift; - my $tb_id = $q->param('tb_id'); + my $tb_id = $q->param('id'); unless ($tb_id) { if ( my $pi = $q->path_info() ) { ( $tb_id = $pi ) =~ s!^/!!; @@ -179,4 +179,4 @@ =cut -=end \ No newline at end of file +=end