Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the MasonX-Interp-WithCallbacks CPAN distribution.

Report information
The Basics
Id: 28454
Status: resolved
Priority: 0/
Queue: MasonX-Interp-WithCallbacks

People
Owner: Nobody in particular
Requestors: ntyni [...] iki.fi
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.16
Fixed in: 1.18



Subject: test failures with HTML::Mason 1.36
Hi, MasonX-Interp-WithCallbacks currently fails two tests in t/09cgi.t on Debian unstable due to a change in HTML::Mason 1.36. This is Debian bug #434445, http://bugs.debian.org/434445 . Quoting myself from there: [from HTML::Mason changelog] - Request::CGIHandler->exec() now returns the return value from executing the component, just like a normal Request. Reported by Adrian Irving-Beer. This also changes the return code from HTML::Mason::CGIHandler->handle_request() for two of the test cases. Before HTML::Mason 1.36, it happened to be 1 from HTML::Mason::FakeApache::send_http_header(). Now the return code is 'undef', because t/htdocs/dhandler does not have an explicit 'return' statement [1]. The suggested fix is to add an explicit 'return 200' (ie. HTTP OK) into t/htdocs/dhandler. This keeps the tests compatible with both the old and the new HTML::Mason versions (on 1.35, send_http_header() turns 200 into 1, ie. still true.) Trivial patch attached. [1] The actual code that gets eval()'d from the component is generated by HTML::Mason::Compiler::ToObject, which puts an explicit void 'return;' at the end (see the _body() routine) and thus always returns 'undef'. Thanks for your work on MasonX-Interp-WithCallbacks, -- Niko Tyni (on behalf of the Debian Perl Group) ntyni@iki.fi
Subject: dhandler.patch
--- libmasonx-interp-withcallbacks-perl-1.16/t/htdocs/dhandler 2007/07/23 21:40:48 1.1 +++ libmasonx-interp-withcallbacks-perl-1.16/t/htdocs/dhandler 2007/07/23 21:40:55 @@ -1 +1,2 @@ % $m->print(ref $ARGS{result} ? $ARGS{result}->($m) : $ARGS{result}); +% return 200;
Subject: Re: [rt.cpan.org #28454] test failures with HTML::Mason 1.36
Date: Tue, 24 Jul 2007 12:40:34 -0700
To: bug-MasonX-Interp-WithCallbacks [...] rt.cpan.org
From: "David E. Wheeler" <david [...] kineticode.com>
On Jul 24, 2007, at 11:41, ntyni@iki.fi via RT wrote: Show quoted text
> The suggested fix is to add an explicit 'return 200' (ie. HTTP OK) > into t/htdocs/dhandler. This keeps the tests compatible with both the > old and the new HTML::Mason versions (on 1.35, send_http_header() > turns > 200 into 1, ie. still true.) Trivial patch attached.
Thanks, applied. 1.17 is on its way to CPAN now. Best, David