The new way in which some of the LWP tests are expressed in version 5.824
tickles a bug in perl that I discovered about five years ago (#27028) and
which is present in all versions up to 5.8.8.  The bug is that a qr/$/m
effectively has the /m ignored.  This is causing false test failures.
Fortunately, there's an easy workaround (attached).

-zefram
diff -ur libwww-perl-5.824.orig/t/local/http.t 
libwww-perl-5.824.mod0/t/local/http.t
--- libwww-perl-5.824.orig/t/local/http.t       2009-02-11 10:35:25.000000000 
+0000
+++ libwww-perl-5.824.mod0/t/local/http.t       2009-02-14 10:56:53.180673587 
+0000
@@ -114,7 +114,7 @@
 $_ = $res->content;
 @accept = /^Accept:\s*(.*)/mg;
 
-ok($_, qr/^From:\s*gis...@aas\.no$/m);
+ok($_, qr/^From:\s*gis...@aas\.no\n/m);
 ok($_, qr/^Host:/m);
 ok(@accept, 3);
 ok($_, qr/^Accept:\s*text\/html/m);
@@ -122,8 +122,8 @@
 ok($_, qr/^Accept:\s*image\/\*/m);
 ok($_, qr/^If-Modified-Since:\s*\w{3},\s+\d+/m);
 ok($_, qr/^Long-Text:\s*This.*broken between/m);
-ok($_, qr/^Foo-Bar:\s*1$/m);
-ok($_, qr/^X-Foo:\s*Bar$/m);
+ok($_, qr/^Foo-Bar:\s*1\n/m);
+ok($_, qr/^X-Foo:\s*Bar\n/m);
 ok($_, qr/^User-Agent:\s*Mozilla\/0.01/m);
 
 # Try it with the higher level 'get' interface

Reply via email to