File Coverage

blib/lib/Regexp/Common/URI/RFC2384.pm
Criterion Covered Total %
statement 28 28 100.0
branch n/a
condition n/a
subroutine 9 9 100.0
pod n/a
total 37 37 100.0


line stmt bran cond sub pod time code
1             package Regexp::Common::URI::RFC2384;
2              
3              
4 71     71   228 use Regexp::Common qw /pattern clean no_defaults/;
  71         73  
  71         295  
5 71     71   262 use Regexp::Common::URI::RFC1738 qw /$unreserved_range $escape $hostport/;
  71         79  
  71         5149  
6              
7 71     71   266 use strict;
  71         80  
  71         1096  
8 71     71   246 use warnings;
  71         132  
  71         1663  
9              
10 71     71   215 use vars qw /$VERSION/;
  71         67  
  71         2826  
11             $VERSION = '2016060801';
12              
13 71     71   238 use vars qw /@EXPORT @EXPORT_OK %EXPORT_TAGS @ISA/;
  71         69  
  71         3059  
14              
15 71     71   239 use Exporter ();
  71         76  
  71         3483  
16             @ISA = qw /Exporter/;
17              
18              
19             my %vars;
20              
21             BEGIN {
22 71     71   203 $vars {low} = [qw /$achar_range $achar $achars $achar_more/];
23 71         158 $vars {connect} = [qw /$enc_sasl $enc_user $enc_ext $enc_auth_type $auth
24             $user_auth $server/];
25 71         1932 $vars {parts} = [qw /$pop_url/];
26             }
27              
28 71     71   233 use vars map {@$_} values %vars;
  71         76  
  71         165  
  213         15890  
29              
30             @EXPORT = qw /$host/;
31             @EXPORT_OK = map {@$_} values %vars;
32             %EXPORT_TAGS = (%vars, ALL => [@EXPORT_OK]);
33              
34             # RFC 2384, POP3.
35              
36             # Lowlevel definitions.
37             $achar_range = "$unreserved_range&=~";
38             $achar = "(?:[$achar_range]|$escape)";
39             $achars = "(?:(?:[$achar_range]+|$escape)*)";
40             $achar_more = "(?:(?:[$achar_range]+|$escape)+)";
41             $enc_sasl = $achar_more;
42             $enc_user = $achar_more;
43             $enc_ext = "(?:[+](?:APOP|$achar_more))";
44             $enc_auth_type = "(?:$enc_sasl|$enc_ext)";
45             $auth = "(?:;AUTH=(?:[*]|$enc_auth_type))";
46             $user_auth = "(?:$enc_user$auth?)";
47             $server = "(?:(?:$user_auth\@)?$hostport)";
48             $pop_url = "(?:pop://$server)";
49              
50              
51             1;
52              
53             __END__