Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 6138
Status: resolved
Priority: 0/
Queue: WWW-Mechanize

People
Owner: MARKSTOS [...] cpan.org
Requestors: mjd [...] plover.com
Cc:
AdminCc:

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



To: bug-WWW-Mechanize [...] rt.cpan.org
Subject: ->select
Date: Mon, 26 Apr 2004 14:56:17 -0400
From: Mark Jason Dominus <mjd [...] plover.com>
1. The return value of the ->select method is not documented. 2. The ->select method is documented in the section on "Form submission methods", but it should be in the section on "Form field filling methods" 3. It appears that ->select returns the current selection of the specified "SELECT" widget. This is not good behavior. It should return success if the specified selection was successfully executed. There should be a separate method for querying the values already in the form. I suggest $a->form_value($name) which would return the appropriate string value, or, if there was no widget with the specified name, undef. The ->form_value method could then be used to determine wheher a particular widget existed, and, if so, what its value was.
[mjd@plover.com - Mon Apr 26 14:54:25 2004]: Show quoted text
> > 1. The return value of the ->select method is not documented. > > 2. The ->select method is documented in the section on "Form > submission methods", but it should be in the section on "Form field > filling methods" > > 3. It appears that ->select returns the current selection of the > specified "SELECT" widget. This is not good behavior. It should > return success if the specified selection was successfully > executed. There should be a separate method for querying the > values already in the form. I suggest > > $a->form_value($name) > > which would return the appropriate string value, or, if there was > no widget with the specified name, undef. The ->form_value method > could then be used to determine wheher a particular widget existed, > and, if so, what its value was.
These issues have been addressed and commited to CVS now. I believe a value() method was implemented that works somewhat like the $a->form_value() you suggest. Also, HTML::Form now has a handy param() method.