NAME
WWW::Mechanize::Plugin::Ajax - WWW::Mechanize plugin that provides the XMLHttpRequest object
VERSION
Version 0.01 (alpha)
SYNOPSIS
use WWW::Mechanize;
$m = new WWW::Mechanize;
$m->use_plugin('Ajax');
$m->get('http://some.site.com/that/relies/on/ajax');
DESCRIPTION
This module is a plugin for WWW::Mechanize that loads the JavaScript plugin (WWW::Mechanize::Plugin::JavaScript) and provides it with the XMLHttpRequest
object.
To load the plugin, use WWW::Mechanize's use_plugin
method, as shown in the Synopsis. (The current stable release of W:M doesn't support it; see "PREREQUISITES", below.) Any extra arguments to use_plugin
will be passed on to the JavaScript plugin (at least for now).
ASYNCHRONY
The XMLHttpRequest
object currently does not support asynchronous connections. Later this will probably become an option, at least for threaded perls.
PREREQUISITES
This plugin requires perl 5.8.3 or higher, and the following modules:
WWW::Mechanize::Plugin::JavaScript version 0.003 or later
constant 1.03 or later
constant private
XML::DOM::Lite
And you'll also need the experimental version of WWW::Mechanize available at http://www-mechanize.googlecode.com/svn/branches/plugins/
BUGS
If you find any bugs, please report them to the author by e-mail (preferably with a patch :-).
There is currently one known security issue: The server to which a request is sent is not checked to see whether it the same server from which the requesting page originated.
Fake cookies (created with the setRequestHeader
method) are clobbered if there are any real cookies.
XML::DOM::Lite is quite lenient toward badly-formed XML, so the responseXML
property returns something useful even in cases when it should be null.
Furthermore, this module follows the badly-designed API that is unfortunately the de facto standard so I can't do anything about it.
AUTHOR & COPYRIGHT
Copyright (C) 2007 Father Chrysostomos <['sprout', ['org', 'cpan'].reverse().join('.')].join('@')
>
This program is free software; you may redistribute it and/or modify it under the same terms as perl.