File Coverage

blib/lib/WWW/AUR/UserAgent.pm
Criterion Covered Total %
statement 17 17 100.0
branch 1 2 50.0
condition n/a
subroutine 6 6 100.0
pod 1 2 50.0
total 25 27 92.5


line stmt bran cond sub pod time code
1             package WWW::AUR::UserAgent;
2              
3 9     9   39 use warnings 'FATAL' => 'all';
  9         13  
  9         461  
4 9     9   35 use strict;
  9         12  
  9         255  
5              
6 9     9   34938 use LWP::UserAgent qw();
  9         374837  
  9         274  
7 9     9   76 use WWW::AUR qw();
  9         14  
  9         946  
8              
9             our @ISA = qw(LWP::UserAgent);
10              
11             sub new
12             {
13 126     126 1 301 my $class = shift;
14              
15 126         1031 $class->SUPER::new( 'agent' => "WWW::AUR/v$WWW::AUR::VERSION", @_ );
16             }
17              
18             #---CLASS METHOD---
19             sub InitTLS
20             {
21 115 50   115 0 234 eval { require LWP::Protocol::https; 1 } or
  115         4670  
  115         624118  
22             die "failed to load LWP::Protocol::https, error:\n$@\n"
23             . "(ensure that LWP::Protocol::https is installed)\n"
24             }
25              
26             1;