Subject: | Problems with field names containing [] |
From: | Roland Moriz <roland [...] moriz.de> |
To: | bug-WWW-Mechanize [...] rt.cpan.org |
Date: | 27 Jul 2003 12:10:58 +0200 |
Hi,
looks like WWW::Mechanize has some problems with field names like
"ObjeRegS0[]":
Can't call method "value" on an undefined value at
/usr/local/share/perl/5.8.0/WWW/Mechanize.pm line 448.
which is between the ARRAY part of set_fields:
while( my ( $field, $value ) = each %fields ) {
if ( ref $value eq 'ARRAY' ) {
$form->find_input( $field, undef,
$value->[1])->value($value->[0] );
} else {
$form->value($field => $value);
}
}
also field() is affected. Probably field names with {} will fail, too.
Especially poor php driven sites are using the [] syntax to get back
complete arrays.
with kind regards,
Mit freundlichen Gruessen,
Roland Moriz
--
Muenchen/Germany - http://www.roland-moriz.de/