NAME

HTTP::WebTest::Cookies - Cookie storage and management

SYNOPSIS

    use HTTP::WebTest::Cookies;

    $cookie_jar = HTTP::WebTest::Cookies->new;

    $cookie_jar->accept_cookies($bool);
    $cookie_jar->send_cookies($bool);

    $cookie_jar->add_cookie_header($request);
    $cookie_jar->extract_cookies($response);

DESCRIPTION

Subclass of HTTP::Cookies which enables optional transmission and receipt of cookies.

METHODS

accept_cookies($optional_accept_cookies)

Enables or disables receipt of cookies if boolean parameter $optional_accept_cookies is passed.

Returns

True if receipt of cookies is enabled; false otherwise.

send_cookies($optional_send_cookies)

Enables or disables transmission of cookies if boolean parameter $optional_send_cookies is passed.

Returns

True if transmission of cookies is enabled; false otherwise.

extract_cookies (...)

Overloaded method. Passes all arguments to SUPER::extract_cookies if receipt of cookies is enabled. Does nothing otherwise.

Overloaded method. Passes all arguments to SUPER::add_cookie_header if transmission of cookies is enabled. Does nothing otherwise.

COPYRIGHT

Copyright (c) 2000-2001 Richard Anderson. All rights reserved.

Copyright (c) 2001,2002 Ilya Martynov. All rights reserved.

This module is free software. It may be used, redistributed and/or modified under the terms of the Perl Artistic License.

SEE ALSO

HTTP::WebTest

HTTP::WebTest::API

HTTP::Cookies