WWW::Mechanize::Plugin::Display - Display WWW::Mechanize results in a local web browser.
use WWW::Mechanize; use WWW::Mechanize::Plugin::Display; my $mech = WWW::Mechanize->new; $mech->get('http://www.google.com'); $mech->display;
When you get an unexpected result while using WWW::Mechanize, it can be useful to inspect the current page that Mechanize has fetched in a local browser.
This plugin adds a method for that, depending on HTML::Display for most of the work.
It should work with WWW::Mechanize, or any sub-class of it.
$mech->display();
Display the current HTML content in a local browser.
A quick example of setting a preferred browser:
PERL_HTML_DISPLAY_COMMAND=w3m -T text/html %s
See HTML::Display for configuration details.
Mark Stosberg C<< mark@summersault.com >>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl(1).
To install WWW::Mechanize::Plugin::Display, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Mechanize::Plugin::Display
CPAN shell
perl -MCPAN -e shell install WWW::Mechanize::Plugin::Display
For more information on module installation, please visit the detailed CPAN module installation guide.