Re: Problem with <SELECT MULTIPLE> in Mech (maybe in HTTP::Form as well?)

Hal Vaughan <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.lwp
Organization Threshold Digital, Ltd.
Message-ID <[email protected]>
On Thursday 14 July 2005 05:46 pm, Andy Lester wrote:
> On Thu, Jul 14, 2005 at 05:16:53PM -0400, Hal Vaughan 
([email protected]) wrote:
> > The part I find frustrating is that I won't know how well this works
> > until I submit the form to the site I'm dealing with, and that means I
> > pay for a report.  Is there some way to find out, before calling
> > $form->submit() what will be POSTed when the form/page is submitted?
>
> Sure.  Make your own HTTP::Request object.  Do the dirty work that Mech
> does for you.
>
> xoxo,
> Andy

I'd rather not.  In this case, since there doesn't seem to be a way to set a 
<SELECT MULTIPLE>, I'm doing it myself.  Once that is done, I'm trying to 
read the object and see if it has been changed, and so far I can't verify it.  
That's why I want to find some way to verify just what is being sent out.

I've tried (after setting the correct form)

$mech->select($name, $val)

and

$mech->select($name, \@val)

with a 1 element array, and neither is working.  I realize that HTTP::Form 
handles multiple selects differently, but it seems impossible to set a 
<SELECT MULTIPLE> through Mech.  Please tell me I've missed something in what 
I'm doing with the above methods and that there is an answer that I, in my 
exhausted state, am missing.  The first method above works perfectly -- as 
long as the <SELECT> isn't multiple.

Hal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.