Making changes
You can change the code so that it takes a variable:
my $name = "Linda Julien";
$agent->form_name("form1");
$agent->field("name", $name);
$agent->submit_form(form_name => "form1");
|
Or, put these lines in a subfunction that you can call later:
sub fill_in_name { my $name = shift; $agent->form_name("form1"); $agent->field("name", $name); $agent->submit_form(form_name => "form1"); } fill_in_name("Linda Julien"); |
HTTP::Recorder generates most of the code, so you only need to make small changes to fit it into your existing framework.