#!/usr/bin/perl -- use strict; use warnings; use URI; use WWW::Scripter; Main( @ARGV ); exit( 0 ); sub Main { my $w = WWW::Scripter->new( autocheck => 1, show_progress => 1, # prints to stderr ); $w->use_plugin('JavaScript'); #~ $w->add_handler("request_send", sub { shift->dump; return }); #~ $w->add_handler("response_done", sub { shift->dump; return }); $w->timeout(0.00000000001); for my $return ( qw/ false true / ) { warn "BowlingRETURNVALUE => $return \n"; $w->get( data_url($return) ); $w->submit; #~ $w->submit_form( #~ form_number => 0, #~ fields => { qw' user_choice Enter ' }, #~ ); } } BEGIN { my $html = <<'HTML';
##
BowlingRETURNVALUE => false
** GET data:text/html;base64,PGh0bWw+ID...Pgo= ==> 200 Document follows
Strike
BowlingRETURNVALUE => true
** GET data:text/html;base64,PGh0bWw+ID...+Cg== ==> 200 Document follows
Strike
** POST http://localhost/ ==> 500 Can't connect to localhost:80 (timeout)
Error POSTing http://localhost/: Can't connect to localhost:80 (timeout) at C:/perl/site/5.14.1/lib/WWW/Scripter.pm line 598