5 $ua = LWP::UserAgent->new();
7 $ua->protocols_forbidden(['hTtP']);
8 print "not " unless scalar(@{$ua->protocols_forbidden()}) == 1;
11 print "not " unless @{$ua->protocols_forbidden()}[0] eq 'hTtP';
14 $response = $ua->get('http://www.cpan.org/');
16 print "not " unless $response->is_error();
19 print "not " if $ua->is_protocol_supported('http');
22 print "not " if $ua->protocols_allowed();
25 $ua->protocols_forbidden(undef);
27 print "not " if $ua->protocols_forbidden();