Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 26602
Status: resolved
Priority: 0/
Queue: Test-WWW-Mechanize

People
Owner: Nobody in particular
Requestors: mark [...] blackmans.org
Cc:
AdminCc:

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



Subject: fix tests
This is perl, v5.8.8 built for i386-solaris Test-WWW-Mechanize-1.12 SunOS yenfire 5.10 Generic_125101-04 i86pc i386 i86pc The module tests currently spawn a server (based on HTTP::Server::Simple::CGI) which is killed when a __DIE__ signal is received, normally only when the invoking perl dies. However, as perlvar makes clear, the __DIE__ signal is received when eval blocks die as well. The new version (1.22) of WWW::Mechanize now calles HTTP::Message::decoded_content which calls Encode.pm which has a eval block that require's Encode::ConfigLocal which is usually not present, so the eval dies and the HTTP server is killed as soon as the $mech object tries to do a 'get'. It's simple to use a system variable, $^S to find out if the __DIE__ signal is being called for an eval so we ignore that case with the patch attached. There appear to be other bugs in the tests when used with WWW::Mechanize 1.22 but those will be covered in another report.
Subject: twm-tests-patch
Download twm-tests-patch
application/octet-stream 4.6k

Message body not shown because it is not plain text.

From: mark [...] blackmans.org
er, apologies for over-terse subject, was meant to be "fix tests for case that eval block failure triggers test server exit" On Tue Apr 24 10:05:24 2007, mark@blackmans.org wrote: Show quoted text
> This is perl, v5.8.8 built for i386-solaris > Test-WWW-Mechanize-1.12 > SunOS yenfire 5.10 Generic_125101-04 i86pc i386 i86pc > > The module tests currently spawn a server (based on > HTTP::Server::Simple::CGI) > which is killed when a __DIE__ signal is received, normally only > when the invoking perl dies. However, as perlvar makes clear, > the __DIE__ signal is received when eval blocks die as well. The > new version (1.22) of WWW::Mechanize now calles > HTTP::Message::decoded_content > which calls Encode.pm which has a eval block that require's > Encode::ConfigLocal > which is usually not present, so the eval dies and the HTTP server > is killed as soon as the $mech object tries to do a 'get'. It's simple > to use a system variable, $^S to find out if the __DIE__ signal is > being > called for an eval so we ignore that case with the patch attached. > > There appear to be other bugs in the tests when used with > WWW::Mechanize 1.22 > but those will be covered in another report.
Thank you so much for this. I'm putting out 1.14 today.