GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
HTTP::WebTest::Utils(3) User Contributed Perl Documentation HTTP::WebTest::Utils(3)

HTTP::WebTest::Utils - Miscellaneous subroutines used by HTTP::WebTest

    use HTTP::WebTest::Utils;

    *method = make_access_method($field);
    *method = make_access_method($field, $default_value);
    *method = make_access_method($field, sub { ... });

    find_port(hostname => $hostname);
    my $pid = start_webserver(port => $port, server_sub => sub { ... });
    stop_webserver($pid);

    copy_dir($src_dir, $dst_dir);

    load_package($package);

    my $ret = eval_in_playground($code);
    die $@ if $@;

This packages contains utility subroutines used by HTTP::WebTest. All of them can be exported but none of them is exported by default.

Creates anonymous subroutine which can be used as accessor method. Method can be used with objects that are blessed hashes.

Typical usage is

    *method = make_access_method($field, ...);

Parameters

  • $field

    A hash field used for created accessor method.

  • $optional_default_value

    If $optional_default_value is a code reference, uses values returned by its execution as default for created accessor method. Otherwise, uses $optional_default_value as name of method which returns default value for created accessor method.

Returns

Returns

Free port number for network interface specified by $hostname.

Starts separate process with a test webserver.

Parameters

port => $port
A port number where the test webserver listens for incoming connections.
server_sub => $server_sub
A reference on a subroutine to handle requests. It get passed two named parameters: "connect" and "request".

Kills a test webserver specified by its PID.

Copies directiory recursively.

Loads package unless it is already loaded.

Evaluates perl code inside playground package.

Returns

A return value of evaluated code.

Create anonymous subroutine inside playground package.

Returns

A reference on anonymous subroutine.

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

HTTP::WebTest::API

2003-03-02 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.