I am not super familiar with this package in the first place. I discovered that the use_plugin('JavaScript') method consumes alot of memory through a profiler. I swapped this method for the plugin('JavaScript'), though the memory consumption was lower, i could not event go through the login page form of the websites i am supposed to scrap.
Globally defined:
my $scripter = WWW::Scripter->new();
$scripter->use_plugin('JavaScript')
if(my $form = $scripter->form_with_fields("Password")){
$form->value('Password', $conf->{'moxa_p'});
$form->submit();
}else{
print "dbg +> form 1.0 not found";
}
Tried using the delete and undef keyword but it does not help at all!
Reduce stack of cached pages (WWW::Scripter WWW::Mechanize)
Use max_docs in WWW::Scripter or stack_depth in WWW::Mechanize. WWW::Machanize man page recommends setting in to 5 or 10.
man WWW::Scripter
man WWW::Mechanize