Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

subtest to restrict scope

use strict;
use warnings;

use HTTP::CookieJar::LWP ();
use LWP::UserAgent       ();

use Test::More;

subtest first => sub {
    my $jar = HTTP::CookieJar::LWP->new;
    my $ua  = LWP::UserAgent->new(
        cookie_jar        => $jar,
        protocols_allowed => ['http', 'https'],
        timeout           => 10,
    );
    my $response = $ua->get('https://google.com/');
    ok $response->is_success;
    diag $jar->dump_cookies;
};

subtest second => sub {
    my $jar = HTTP::CookieJar::LWP->new;
    my $ua  = LWP::UserAgent->new(
        cookie_jar        => $jar,
        protocols_allowed => ['http', 'https'],
        timeout           => 10,
    );
    my $response = $ua->get('https://google.com/');
    ok $response->is_success;
    diag $jar->dump_cookies;
};



done_testing;