line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
38964
|
use 5;
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
56
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package XML::Catalogs;
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
5
|
use strict;
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
6
|
1
|
|
|
1
|
|
6
|
use warnings;
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
42
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
1087
|
use version; our $VERSION = qv('v1.0.3');
|
|
1
|
|
|
|
|
2462
|
|
|
1
|
|
|
|
|
7
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
1098
|
use File::ShareDir qw( );
|
|
1
|
|
|
|
|
17607
|
|
|
1
|
|
|
|
|
275
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub import {
|
15
|
0
|
|
|
0
|
|
|
my $class = shift;
|
16
|
0
|
|
|
|
|
|
for (@_) {
|
17
|
0
|
0
|
|
|
|
|
if ($_ eq -libxml) {
|
18
|
0
|
|
|
|
|
|
$class->notify_libxml()
|
19
|
|
|
|
|
|
|
} else {
|
20
|
0
|
|
|
|
|
|
require Carp;
|
21
|
0
|
|
|
|
|
|
Carp::croak("Unrecognized import $_");
|
22
|
|
|
|
|
|
|
}
|
23
|
|
|
|
|
|
|
}
|
24
|
|
|
|
|
|
|
}
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub get_catalog_path {
|
28
|
0
|
|
|
0
|
1
|
|
my $class = shift;
|
29
|
0
|
|
|
|
|
|
my $path;
|
30
|
0
|
0
|
|
|
|
|
return $path if eval {
|
31
|
0
|
|
|
|
|
|
$path = File::ShareDir::module_file($class, 'catalog.xml'); 1 };
|
|
0
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
require Carp;
|
33
|
0
|
|
|
|
|
|
Carp::croak("Can't locate ${class}'s catalog");
|
34
|
|
|
|
|
|
|
}
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub get_catalog_url {
|
38
|
0
|
|
|
0
|
1
|
|
my $class = shift;
|
39
|
0
|
|
|
|
|
|
require URI::file;
|
40
|
0
|
|
|
|
|
|
return URI::file->new($class->get_catalog_path());
|
41
|
|
|
|
|
|
|
}
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub notify_libxml {
|
45
|
0
|
|
|
0
|
1
|
|
my $class = shift;
|
46
|
0
|
|
|
|
|
|
require XML::LibXML;
|
47
|
0
|
|
|
|
|
|
XML::LibXML->VERSION(1.53);
|
48
|
0
|
|
|
|
|
|
XML::LibXML->load_catalog(
|
49
|
|
|
|
|
|
|
$class->get_catalog_path()
|
50
|
|
|
|
|
|
|
);
|
51
|
|
|
|
|
|
|
}
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1;
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__END__
|