in reply to Unable to get set the hidden parameters "__VIEWSTATE" and "__EVENTVALIDATION" .
You said you are unable to set them... what exactly is happening? Have you tried printing $form after all of the push_inputs are finished? Data::Dumper is excellent for debugging data structures, but without knowing what is happening it's difficult to suggest what to do next.