in reply to How can i recognize a button having same name

Instead of your version:

$agent->{req} = $request; $agent->_do_request;

You might want to try:

$agent->request($request);

This seems to be the new internal method instead of _do_request. Apparently it takes in the $request object as a parameter, rather than requiring you to set it manually with $agent->{req}.

Note: this is completely untested. I just looked at WWW::Mechanize's perldocs and made an educated guess. :)