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" |
--- /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/