line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package URI::pop; # RFC 2384 |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
39
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '5.20'; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
437
|
use parent 'URI::_server'; |
|
1
|
|
|
|
|
293
|
|
|
1
|
|
|
|
|
5
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
47
|
use URI::Escape qw(uri_unescape); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
515
|
|
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
2
|
1
|
4
|
sub default_port { 110 } |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
#pop://;auth=@: |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub user |
17
|
|
|
|
|
|
|
{ |
18
|
7
|
|
|
7
|
0
|
866
|
my $self = shift; |
19
|
7
|
|
|
|
|
17
|
my $old = $self->userinfo; |
20
|
|
|
|
|
|
|
|
21
|
7
|
100
|
|
|
|
17
|
if (@_) { |
22
|
4
|
|
|
|
|
7
|
my $new_info = $old; |
23
|
4
|
100
|
|
|
|
9
|
$new_info = "" unless defined $new_info; |
24
|
4
|
|
|
|
|
24
|
$new_info =~ s/^[^;]*//; |
25
|
|
|
|
|
|
|
|
26
|
4
|
|
|
|
|
8
|
my $new = shift; |
27
|
4
|
100
|
66
|
|
|
19
|
if (!defined($new) && !length($new_info)) { |
28
|
1
|
|
|
|
|
4
|
$self->userinfo(undef); |
29
|
|
|
|
|
|
|
} else { |
30
|
3
|
50
|
|
|
|
7
|
$new = "" unless defined $new; |
31
|
3
|
|
|
|
|
4
|
$new =~ s/%/%25/g; |
32
|
3
|
|
|
|
|
5
|
$new =~ s/;/%3B/g; |
33
|
3
|
|
|
|
|
11
|
$self->userinfo("$new$new_info"); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
7
|
100
|
|
|
|
16
|
return undef unless defined $old; |
38
|
5
|
|
|
|
|
10
|
$old =~ s/;.*//; |
39
|
5
|
|
|
|
|
13
|
return uri_unescape($old); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub auth |
43
|
|
|
|
|
|
|
{ |
44
|
5
|
|
|
5
|
0
|
434
|
my $self = shift; |
45
|
5
|
|
|
|
|
11
|
my $old = $self->userinfo; |
46
|
|
|
|
|
|
|
|
47
|
5
|
100
|
|
|
|
10
|
if (@_) { |
48
|
3
|
|
|
|
|
6
|
my $new = $old; |
49
|
3
|
50
|
|
|
|
5
|
$new = "" unless defined $new; |
50
|
3
|
|
|
|
|
11
|
$new =~ s/(^[^;]*)//; |
51
|
3
|
|
|
|
|
6
|
my $user = $1; |
52
|
3
|
|
|
|
|
16
|
$new =~ s/;auth=[^;]*//i; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
3
|
|
|
|
|
5
|
my $auth = shift; |
56
|
3
|
100
|
|
|
|
7
|
if (defined $auth) { |
57
|
2
|
|
|
|
|
4
|
$auth =~ s/%/%25/g; |
58
|
2
|
|
|
|
|
2
|
$auth =~ s/;/%3B/g; |
59
|
2
|
|
|
|
|
5
|
$new = ";AUTH=$auth$new"; |
60
|
|
|
|
|
|
|
} |
61
|
3
|
|
|
|
|
9
|
$self->userinfo("$user$new"); |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
5
|
50
|
|
|
|
11
|
return undef unless defined $old; |
66
|
5
|
|
|
|
|
15
|
$old =~ s/^[^;]*//; |
67
|
5
|
100
|
|
|
|
17
|
return uri_unescape($1) if $old =~ /;auth=(.*)/i; |
68
|
3
|
|
|
|
|
5
|
return; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
1; |