NAME

WWW::Mechanize::Pluggable - custmomizable via plugins

SYNOPSIS

use WWW::Mechanize::Pluggable;
# plugins now automatically loaded

DESCRIPTION

This module provides all of the same functionality of WWW::Mechanize, but adds support for plugins using Module::Pluggable; this means that any module named WWW::Mechanize::Plugin::whatever... will be found and loaded when WWW::Mechanize::Pluggable is loaded.

Big deal, you say. Well, it becomes a big deal in conjunction with WWW::Mechanize::Pluggable's other feature: plugin hooks. When plugins are loaded, their import() methods can call WWW::Mechanize::Pluggable's prehook and posthook methods. These methods add callbacks to the plugin code in WWW::Mechanize::Pluggable's methods. These callbacks can act before a method or after it, and have to option of short-circuiting the call to the WWW::Mechanize::Pluggable method altogether.

These methods receive whatever parameters the WWW::Mechanize::Pluggable methods received, plus a reference to the actvive Mech object.

All other extensions to WWW::Mechanize::Pluggable are handled by the plugins.

USAGE

See the synopsis for an example use of the base module; extended behavior is documented in the plugin classes.

BUGS

None known.

SUPPORT

Contact the author at mcmahon@yahoo-inc.com.

AUTHOR

Joe McMahon
mcmahon@yahoo-inc.com

COPYRIGHT

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.

SEE ALSO

WWW::Mechanize

CLASS METHODS

new

new constructs a WWW::Mechanize::Pluggable object and initializes its pre and port hook queues.

init

init runs through all of the plugins for this class and calls their init methods (if they exist). Not meant to be called by your code; it's internal-use-only.

AUTOLOAD

AUTOLOAD here is carefully tweaked to push anything we don't understand (either subroutine call or method call) to the parent class(es). Note that since SUPER searches the entire inheritance tree, we just have to add classes to @ISA to get SUPER to look in them.