Skip Menu |

This queue is for tickets about the HTTP-Server-Simple CPAN distribution.

Report information
The Basics
Id: 19875
Status: resolved
Priority: 0/
Queue: HTTP-Server-Simple

People
Owner: Nobody in particular
Requestors: sjq [...] debian.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.18
Fixed in: (no value)



Subject: Incorrect setup() method
The setup() method in HTTP::Server::Simple has been coded incorrectly. It currently looks like this: sub setup { my ($self) = @_; while ( my ( $item, $value ) = splice @_, 0, 2 ) { $self->$item($value) if $self->can($item); } } Because $self is not shifted off @_ the while(splice) goes through the list of key-value pairs incorrectly and none of the methods ever get called. I suspect this hasn't been spotted before as most people will be subclassing HTTP::Server::Simple::CGI which overrides the setup() method. Attached is a patch against 0.18. Thanks, Stephen Quinney
Subject: HTTP-Server-Simple.patch
--- lib/HTTP/Server/Simple.pm.orig 2006-06-13 14:09:43.510106000 +0100 +++ lib/HTTP/Server/Simple.pm 2006-06-13 14:28:45.494574000 +0100 @@ -421,7 +421,7 @@ =cut sub setup { - my ($self) = @_; + my $self = shift @_; while ( my ( $item, $value ) = splice @_, 0, 2 ) { $self->$item($value) if $self->can($item); }
Subject: Re: [rt.cpan.org #19875] Incorrect setup() method
Date: Wed, 14 Jun 2006 11:13:23 -0400
To: Stephen Quinney via RT <bug-HTTP-Server-Simple [...] rt.cpan.org>
From: jesse <jesse [...] fsck.com>
Thanks. Applied.
Subject: Re: [rt.cpan.org #19875] Incorrect setup() method
Date: Thu, 15 Jun 2006 09:59:05 +0100
To: bug-HTTP-Server-Simple [...] rt.cpan.org
From: "Stephen Quinney" <sjq [...] debian.org>
On 14/06/06, Jesse via RT <bug-HTTP-Server-Simple@rt.cpan.org> wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=19875 > > > Thanks. Applied. >
Great, are you planning to make a new release soon? I noticed that several bugs listed on rt.cpan have been fixed in svn now. Thanks, Stephen
Subject: Re: [rt.cpan.org #19875] Incorrect setup() method
Date: Thu, 15 Jun 2006 16:59:07 +0200
To: bug-HTTP-Server-Simple [...] rt.cpan.org
From: Jesse Vincent <jesse [...] fsck.com>
done On Jun 15, 2006, at 10:59 AM, Stephen Quinney via RT wrote: Show quoted text
> > Queue: HTTP-Server-Simple > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=19875 > > > On 14/06/06, Jesse via RT <bug-HTTP-Server-Simple@rt.cpan.org> wrote:
>> >> <URL: http://rt.cpan.org/Ticket/Display.html?id=19875 > >> >> Thanks. Applied. >>
> > Great, are you planning to make a new release soon? I noticed that > several bugs listed on rt.cpan have been fixed in svn now. > > Thanks, > > Stephen >