line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package XML::Loy::HostMeta; |
2
|
2
|
|
|
2
|
|
1300
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
61
|
|
3
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
65
|
|
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
|
|
11
|
use XML::Loy with => ( |
6
|
|
|
|
|
|
|
prefix => 'hm', |
7
|
|
|
|
|
|
|
namespace => 'http://host-meta.net/xrd/1.0' |
8
|
2
|
|
|
2
|
|
527
|
); |
|
2
|
|
|
|
|
6
|
|
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
15
|
use Carp qw/carp/; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
386
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# No constructor |
13
|
|
|
|
|
|
|
sub new { |
14
|
1
|
|
|
1
|
1
|
447
|
carp 'Only use ' . __PACKAGE__ . ' as an extension to XRD'; |
15
|
1
|
|
|
|
|
577
|
return; |
16
|
|
|
|
|
|
|
}; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# host information |
19
|
|
|
|
|
|
|
sub host { |
20
|
3
|
|
|
3
|
1
|
14
|
my $self = shift->root->at('*'); |
21
|
|
|
|
|
|
|
|
22
|
3
|
100
|
|
|
|
63
|
unless ($_[0]) { |
23
|
2
|
100
|
|
|
|
5
|
my $h = $self->at('Host') or return; |
24
|
1
|
|
|
|
|
31
|
return $h->all_text; |
25
|
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# Set hist information |
28
|
1
|
|
|
|
|
4
|
return $self->set(Host => shift); |
29
|
|
|
|
|
|
|
}; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |