line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package METS::Parse::Simple; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
59511
|
use strict; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
45
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
46
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
764
|
use Class::Utils qw(set_params); |
|
2
|
|
|
|
|
46434
|
|
|
2
|
|
|
|
|
33
|
|
7
|
2
|
|
|
2
|
|
1852
|
use XML::Simple; |
|
2
|
|
|
|
|
15079
|
|
|
2
|
|
|
|
|
13
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = 0.01; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Constructor. |
12
|
|
|
|
|
|
|
sub new { |
13
|
0
|
|
|
0
|
1
|
|
my ($class, @params) = @_; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# Create object. |
16
|
0
|
|
|
|
|
|
my $self = bless {}, $class; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# Process parameters. |
19
|
0
|
|
|
|
|
|
set_params($self, @params); |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
return $self; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# Parse XML data. |
25
|
|
|
|
|
|
|
sub parse { |
26
|
0
|
|
|
0
|
1
|
|
my ($self, $mets_data) = @_; |
27
|
0
|
|
|
|
|
|
my $mets_hr = XMLin($mets_data); |
28
|
0
|
|
|
|
|
|
return $mets_hr; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |