WWW::Scripter is a subclass of WWW::Mechanize that uses the W3C DOM and provides support for scripting.
No actual scripting engines are provided with WWW::Scripter, but are available as separate plugins.
$w = new WWW::Scripter;
$w->use_plugin('Ajax'); # packaged separately
$w->content; # returns the HTML content, possibly modified
# by scripts