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 72     72   609 use Regexp::Common qw /pattern clean no_defaults/;
  72         163  
  72         502  
5 72     72   426 use Regexp::Common::URI::RFC1738 qw /$unreserved_range $escape $hostport/;
  72         161  
  72         5939  
6              
7 72     72   470 use strict;
  72         165  
  72         1452  
8 72     72   374 use warnings;
  72         163  
  72         2080  
9              
10 72     72   484 use vars qw /$VERSION/;
  72         560  
  72         3494  
11             $VERSION = '2017060201';
12              
13 72     72   652 use vars qw /@EXPORT @EXPORT_OK %EXPORT_TAGS @ISA/;
  72         170  
  72         3661  
14              
15 72     72   424 use Exporter ();
  72         161  
  72         4401  
16             @ISA = qw /Exporter/;
17              
18              
19             my %vars;
20              
21             BEGIN {
22 72     72   357 $vars {low} = [qw /$achar_range $achar $achars $achar_more/];
23 72         415 $vars {connect} = [qw /$enc_sasl $enc_user $enc_ext $enc_auth_type $auth
24             $user_auth $server/];
25 72         2401 $vars {parts} = [qw /$pop_url/];
26             }
27              
28 72     72   437 use vars map {@$_} values %vars;
  72         155  
  72         348  
  216         18965  
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__