Subject: | No need to set hidden fields to their values |
Avoid warnings trying to set read-only fields. And make resulting scripts smaller and cleaner. No functional change.
--- Recorder.pm.orig Tue Mar 2 00:55:37 2004
+++ lib/HTTP/Recorder.pm Wed Jun 16 20:39:48 2004
@@ -437,7 +438,8 @@
$attrs->{type} =~ m/submit/i) {
$formfield = ("$self->{prefix}-form-".
$formnumber."-submit-".$attrs->{name});
- } elsif ($attrs->{name}) {
+ } elsif ($attrs->{name} &&
+ (!$attrs->{type} || $attrs->{type} !~ m/hidden/i)) {
$formfield = ("$self->{prefix}-form-".
$formnumber."-".$attrs->{name});
}