| HTTP-WebTest documentation | Contained in the HTTP-WebTest distribution. |
HTTP::WebTest::Plugin::Loader - Loads external plugins
Not Applicable
This plugin lets you to load external HTTP::WebTest plugins.
GLOBAL PARAMETER
A list of module names. Loads these modules and registers them as
HTTP::WebTest plugins. If the name of the plugin starts with
::, it is prepended with HTTP::WebTest::Plugin. So
plugins = ( ::Click )
is equal to
plugins = ( HTTP::WebTest::Plugin::Click )
Copyright (c) 2001-2003 Ilya Martynov. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
HTTP::WebTest::API (HTTP::WebTest::API)
HTTP::WebTest::Plugins (HTTP::WebTest::Plugins)
| HTTP-WebTest documentation | Contained in the HTTP-WebTest distribution. |
# $Id: Loader.pm,v 1.7 2003/03/02 11:52:09 m_ilya Exp $ package HTTP::WebTest::Plugin::Loader;
use strict; use base qw(HTTP::WebTest::Plugin); use HTTP::WebTest::Utils qw(load_package);
sub param_types { return q(plugins list); } sub start_tests { my $self = shift; $self->global_validate_params(qw(plugins)); my $plugins = $self->global_test_param('plugins'); for my $plugin (@$plugins) { my $name = $plugin; if($name =~ /^::/) { $name = 'HTTP::WebTest::Plugin' . $name; } load_package($name); push @{$self->webtest->plugins}, $name->new($self->webtest); } }
1;