petdance/test-www-mechanize

$mech->grep_submits() should complain about bad input

Opened this issue · 0 comments

I had this line of code

my @see_titles_buttons = $mech->grep_submits( {type => qr/^see_/} );

but what I really wanted was

my @see_titles_buttons = $mech->grep_submits( {name => qr/^see_/} );

grep_submits should have complained about the type argument, especially because grep_submits stomps on the type before handing off to grep_inputs to do the real work.