Randy W. Sims wrote:
>
> The following code connects to a linksys router and resets the
> connection. I can't seem to find the proper way to access the contents
> of the HTML::Form::InputText object without accessing it's internal data
> structure.
>
> This is part of the expression in question:
> my $status = $1 if $input->{value_name}
>
> Anybody know a proper way to get this value?

Hi Randy.

You mean this stuff?

>
> # Determine current connection status
> my $form = $mech->form_number( 1 ) or die "Can't select form";
> my $input = $form->find_input( 'pppoeAct' ) or die "Can't find input";
> my $status = $1 if $input->{value_name} =~ /Status: 
> (Connected|Connecting|Disconnected)/;

Have you looked at

  perldoc HTML::Form

I think $input->value_names() will do what you want. Beware: it returns an array 
regardless
of context.

HTH,

Rob



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to