line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
9
|
|
|
9
|
|
578
|
use strict; |
|
9
|
|
|
|
|
21
|
|
|
9
|
|
|
|
|
542
|
|
2
|
|
|
|
|
|
|
package XML::XBEL::item; |
3
|
|
|
|
|
|
|
|
4
|
9
|
|
|
9
|
|
47
|
use base qw (XML::XBEL::base); |
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
5771
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
XML::XBEL::item - private methods for XBEL items. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 SYNOPSIS |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
None. |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 DESCRIPTION |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Private methods for XBEL items. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=cut |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# $Id: item.pm,v 1.4 2004/06/23 06:23:57 asc Exp $ |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
use XML::LibXML; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub title { |
25
|
|
|
|
|
|
|
my $self = shift; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
return $self->_element("title",@_); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub desc { |
31
|
|
|
|
|
|
|
my $self = shift; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
return $self->_element("desc",$_[0]); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub info { |
37
|
|
|
|
|
|
|
my $self = shift; |
38
|
|
|
|
|
|
|
my $meta = shift; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
if (! defined($meta)) { |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
my @owners = map { |
43
|
|
|
|
|
|
|
$_->getAttribute("owner"); |
44
|
|
|
|
|
|
|
} $self->{'__root'}->findnodes("./info/metadata"); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
return \@owners; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
# |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
my $info = XML::LibXML::Element->new("info"); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
foreach my $owner (@{$meta->{owner}}) { |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
my $meta = XML::LibXML::Element->new("metadata"); |
56
|
|
|
|
|
|
|
$meta->setAttribute("owner",$owner); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
$info->appendChild($meta); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
$self->{'__root'}->addChild($info); |
62
|
|
|
|
|
|
|
return 1; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 VERSION |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
$Revision: 1.4 $ |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 DATE |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
$Date: 2004/06/23 06:23:57 $ |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 AUTHOR |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Aaron Straup Cope Eascope@cpan.orgE |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 SEE ALSO |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 LICENSE |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Copyright (c) 2004 Aaron Straup Cope. All Rights Reserved. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
This is free software, you may use it and distribute it under the |
86
|
|
|
|
|
|
|
same terms as Perl itself. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=cut |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
return 1; |