The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WWW::Mechanize::Script::Plugin - plugin base class for check plugins

VERSION

version 0.100

METHODS

new()

Instantiates new WWW::Mechanize::Script::Plugin. This is an abstract class.

get_check_value(\%check,$value_name)

Retrieves the value for $value_name from the hash %check.

get_check_value_as_bool(\%check,$value_name)

Retrieves the value for $value_name from the hash %check and returns true when it can be interpreted as a boolean value with true content (any object is always returned as it is, (?:(?i)true|on|yes) evaluates to true, anything else to false).

can_check(\%check)

Proves whether this instance can check anything on the current run test. Looks if any of the required "check_value_names" are specified in the check parameters of the current test.

check_value_names()

Returns list of check values which are used to check the response.

Each value has a value_code counterpart which is used to modify the return value of "check_response" when the check upon that value fails.

check_response(\%check,$mech)

Checks the response based on test specifications. See individual plugins for specific test information.

Returns the accumulated code for each failing check along with optional messages containing details about each failure.

  # no error
  return (0);
  # some error
  return ($code,@messages);
  # some error but no details
  return ($code);

BUGS

Please report any bugs or feature requests on the bugtracker website http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Mechanize-Script or by email to bug-www-mechanize-script@rt.cpan.org.

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

Jens Rehsack <rehsack@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Jens Rehsack.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.