petdance/test-www-mechanize

Unused $error in submit_form_ok(), follow_link_ok()

Closed this issue · 1 comments

submit_form_ok() and follow_link_ok() assign what are apparently error messages to a local variable $error but never use the variable for anything.

$ ack -Q '$error'
Mechanize.pm:309:    my $error;
Mechanize.pm:311:        $error = 'No matching form found';
Mechanize.pm:318:            $error = $response->as_string;
Mechanize.pm:367:    my $error;
Mechanize.pm:369:        $error = 'No matching link found';
Mechanize.pm:376:            $error = $response->as_string;

Fixed by commit 1f71e86