Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: mark [...] summersault.com
Cc:
AdminCc:

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



Subject: patch: better error message for illegal values
Download (untitled) / with headers
text/plain 789b
Hello, Here's a small patch for HTML::Form. I was using it as part of WWW::Mechanize::Shell and was getting back an error: "illegal value: 2" The form I was working was huge, and I had no idea which field was causing the problem. This simple patch returns the troublesome field name along with the illegal value, making it much easier to identify. --- /sw/lib/perl5/site_perl/5.8.0/HTML/Form.pm.orig Wed Jun 4 10:48:55 2003 +++ /sw/lib/perl5/site_perl/5.8.0/HTML/Form.pm Wed Jun 4 10:51:34 2003 @@ -754,7 +754,7 @@ } $i++; } - Carp::croak("Illegal value '$val'") unless defined $cur; + Carp::croak($self->name." has illegal value '$val'") unless defined $cur; $self->{current} = $cur; $self->{seen}[$cur] = 1; }


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.