Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 28473
Status: resolved
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: ishigaki [...] cpan.org
Cc:
AdminCc:

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



Subject: t/live/validator.t fails probably due to a minor HTML change
The response from http://validator.w3.org/file-upload.html seems to have changed slightly. Not sure if this change is permanent and for everyone, but below worked for me anyway. diff -ur libwww-perl-5.806/t/live/validator.t libwww-perl-5.806-patched/ t/live/validator.t --- libwww-perl-5.806/t/live/validator.t 2003-01-02 01:46:05.000000000 +0900 +++ libwww-perl-5.806-patched/t/live/validator.t 2007-07-26 00:06:40.644500000 +0900 @@ -40,7 +40,7 @@ $res = $ua->request($req); #print $res->as_string; -unless ($res->content =~ /found to be valid/) { +unless ($res->content =~ /found to be\s+valid/s) { print $res->as_string; print "\nnot "; }
From: JDHEDDEN [...] cpan.org
On Wed Jul 25 11:30:38 2007, ISHIGAKI wrote: Show quoted text
> The response from http://validator.w3.org/file-upload.html seems to > have changed slightly. Not sure if this change is permanent and for > everyone, but below worked for me anyway. > > > diff -ur libwww-perl-5.806/t/live/validator.t libwww-perl-5.806-patched/ > t/live/validator.t > --- libwww-perl-5.806/t/live/validator.t 2003-01-02 > 01:46:05.000000000 +0900 > +++ libwww-perl-5.806-patched/t/live/validator.t 2007-07-26 > 00:06:40.644500000 +0900 > @@ -40,7 +40,7 @@ > $res = $ua->request($req); > #print $res->as_string; > > -unless ($res->content =~ /found to be valid/) { > +unless ($res->content =~ /found to be\s+valid/s) { > print $res->as_string; > print "\nnot "; > }
There could be other white-space issues. Better to use: +unless ($res->content =~ /found\s+to\s+be\s+valid/s) { Patch attached
--- libwww-perl-5.806/t/live/validator.t.orig 2007-07-26 10:50:03.050681500 -0400 +++ libwww-perl-5.806/t/live/validator.t 2007-07-26 10:55:33.625875100 -0400 @@ -40,7 +40,7 @@ $res = $ua->request($req); #print $res->as_string; -unless ($res->content =~ /found to be valid/) { +unless ($res->content =~ /found\s+to\s+be\s+valid/s) { print $res->as_string; print "\nnot "; }
Applied. Thanks!