line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package URI::IRI; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Experimental |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
431
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
6
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
7
|
1
|
|
|
1
|
|
29
|
use URI (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
6
|
use overload '""' => sub { shift->as_string }; |
|
1
|
|
|
0
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
|
0
|
|
|
|
|
0
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '5.19'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
1
|
|
|
1
|
0
|
6
|
my($class, $uri, $scheme) = @_; |
15
|
1
|
|
|
|
|
5
|
utf8::upgrade($uri); |
16
|
1
|
|
|
|
|
5
|
return bless { |
17
|
|
|
|
|
|
|
uri => URI->new($uri, $scheme), |
18
|
|
|
|
|
|
|
}, $class; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub clone { |
22
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
23
|
|
|
|
|
|
|
return bless { |
24
|
|
|
|
|
|
|
uri => $self->{uri}->clone, |
25
|
0
|
|
|
|
|
0
|
}, ref($self); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub as_string { |
29
|
1
|
|
|
1
|
0
|
17
|
my $self = shift; |
30
|
1
|
|
|
|
|
31
|
return $self->{uri}->as_iri; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
our $AUTOLOAD; |
34
|
|
|
|
|
|
|
sub AUTOLOAD |
35
|
|
|
|
|
|
|
{ |
36
|
1
|
|
|
1
|
|
7
|
my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::')+2); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# We create the function here so that it will not need to be |
39
|
|
|
|
|
|
|
# autoloaded the next time. |
40
|
1
|
|
|
1
|
|
257
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
102
|
|
41
|
1
|
|
|
1
|
|
8
|
*$method = sub { shift->{uri}->$method(@_) }; |
|
1
|
|
|
|
|
28
|
|
42
|
1
|
|
|
|
|
5
|
goto &$method; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
0
|
|
|
sub DESTROY {} # avoid AUTOLOADing it |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |