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: 2160
Status: resolved
Worked: 15 min
Priority: 0/
Queue: WWW-Mechanize

People
Owner: Nobody in particular
Requestors: ask [...] develooper.com
Cc:
AdminCc:

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



Date: Wed, 26 Feb 2003 18:05:44 -0800 (PST)
From: Ask Bjoern Hansen <ask [...] develooper.com>
To: bug-WWW-Mechanize [...] rt.cpan.org
Subject: "use of uninitialized warning"
Download (untitled) / with headers
text/plain 588b
--- /usr/lib/perl5/site_perl/5.6.1/WWW/Mechanize.pm~ Wed Feb 26 17:58:44 2003 +++ /usr/lib/perl5/site_perl/5.6.1/WWW/Mechanize.pm Wed Feb 26 17:59:27 2003 @@ -292,7 +292,7 @@ sub form_name { my ($self, $form) = @_; - my @matches = grep {$_->attr('name') eq $form } @{$self->{forms}}; + my @matches = grep { $_->attr('name') and $_->attr('name') eq $form } @{$self->{forms}}; if ( @matches ) { $self->{form} = $matches[0]; warn "There are ", scalar @matches, " forms named $form. The first one was used." -- ask bjoern hansen - http://www.askbjoernhansen.com/
Download (untitled) / with headers
text/plain 275b
Thanks, Ask. I did it like so: - my @matches = grep {$_->attr('name') eq $form } @{$self->{forms}}; + my $temp; + my @matches = grep {defined($temp = $_->attr('name')) and ($temp eq $form) } @{$self->{forms}}; It'll be in the next version, probably in a few days.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.