--- /home/gbarros/Mechanize.pm 2009-03-03 16:19:05.000000000 -0300
+++ ./Mechanize.pm 2009-03-03 15:49:46.000000000 -0300
@@ -1797,7 +1797,7 @@
my( $self, %args ) = @_ ;
for ( keys %args ) {
- if ( !/^(form_(number|name|fields)|(with_)?fields|button|x|y)$/ ) {
+ if ( !/^(form_(number|name|fields|id)|(with_)?fields|button|x|y)$/ ) {
# XXX Why not die here?
$self->warn( qq{Unknown submit_form parameter "$_"} );
}
@@ -1826,6 +1826,9 @@
elsif ( my $form_name = $args{'form_name'} ) {
$self->form_name( $form_name ) or die qq{There is no form named "$form_name"};
}
+ elsif ( my $form_id = $args{'form_id'} ) {
+ $self->form_id( $form_id ) or die qq{There is no form IDed "$form_id"};
+ }
else {
# No form selector was used.
# Maybe a form was set separately, or we'll default to the first form.