| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
|
3
|
|
|
|
|
|
|
our $VERSION = '0.105'; |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use Moose; |
|
6
|
2
|
|
|
2
|
|
13
|
extends qw(RDF::DOAP::Resource); |
|
|
2
|
|
|
|
|
6
|
|
|
|
2
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use RDF::DOAP::Person; |
|
9
|
2
|
|
|
2
|
|
11682
|
use RDF::DOAP::Version; |
|
|
2
|
|
|
|
|
57
|
|
|
|
2
|
|
|
|
|
105
|
|
|
10
|
2
|
|
|
2
|
|
813
|
use RDF::DOAP::Repository; |
|
|
2
|
|
|
|
|
87
|
|
|
|
2
|
|
|
|
|
81
|
|
|
11
|
2
|
|
|
2
|
|
931
|
use RDF::DOAP::Types -types; |
|
|
2
|
|
|
|
|
46
|
|
|
|
2
|
|
|
|
|
79
|
|
|
12
|
2
|
|
|
2
|
|
12
|
use RDF::DOAP::Utils -traits; |
|
|
2
|
|
|
|
|
2
|
|
|
|
2
|
|
|
|
|
16
|
|
|
13
|
2
|
|
|
2
|
|
10188
|
|
|
|
2
|
|
|
|
|
6
|
|
|
|
2
|
|
|
|
|
12
|
|
|
14
|
|
|
|
|
|
|
use RDF::Trine::Namespace qw(rdf rdfs owl xsd); |
|
15
|
2
|
|
|
2
|
|
547
|
my $doap = 'RDF::Trine::Namespace'->new('http://usefulinc.com/ns/doap#'); |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
8
|
|
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has $_ => ( |
|
18
|
|
|
|
|
|
|
traits => [ WithURI ], |
|
19
|
|
|
|
|
|
|
is => 'ro', |
|
20
|
|
|
|
|
|
|
isa => String, |
|
21
|
|
|
|
|
|
|
coerce => 1, |
|
22
|
|
|
|
|
|
|
uri => do { (my $x = $_) =~ s/_/-/g; $doap->$x }, |
|
23
|
|
|
|
|
|
|
) for qw(name shortdesc created description programming_language os ); |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has release => ( |
|
26
|
|
|
|
|
|
|
traits => [ WithURI ], |
|
27
|
|
|
|
|
|
|
is => 'ro', |
|
28
|
|
|
|
|
|
|
isa => ArrayRef[Version], |
|
29
|
|
|
|
|
|
|
coerce => 1, |
|
30
|
|
|
|
|
|
|
uri => $doap->release, |
|
31
|
|
|
|
|
|
|
multi => 1, |
|
32
|
|
|
|
|
|
|
); |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
has $_ => ( |
|
35
|
|
|
|
|
|
|
traits => [ WithURI, Gathering ], |
|
36
|
|
|
|
|
|
|
is => 'ro', |
|
37
|
|
|
|
|
|
|
isa => ArrayRef[Person], |
|
38
|
|
|
|
|
|
|
coerce => 1, |
|
39
|
|
|
|
|
|
|
multi => 1, |
|
40
|
|
|
|
|
|
|
uri => $doap->$_, |
|
41
|
|
|
|
|
|
|
gather_as => ['maintainer'], |
|
42
|
|
|
|
|
|
|
) for qw( maintainer ); |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
has $_ => ( |
|
45
|
|
|
|
|
|
|
traits => [ WithURI, Gathering ], |
|
46
|
|
|
|
|
|
|
is => 'ro', |
|
47
|
|
|
|
|
|
|
isa => ArrayRef[Person], |
|
48
|
|
|
|
|
|
|
coerce => 1, |
|
49
|
|
|
|
|
|
|
multi => 1, |
|
50
|
|
|
|
|
|
|
uri => $doap->$_, |
|
51
|
|
|
|
|
|
|
gather_as => ['contributor'], |
|
52
|
|
|
|
|
|
|
) for qw( developer documenter ); |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
has $_ => ( |
|
55
|
|
|
|
|
|
|
traits => [ WithURI, Gathering ], |
|
56
|
|
|
|
|
|
|
is => 'ro', |
|
57
|
|
|
|
|
|
|
isa => ArrayRef[Person], |
|
58
|
|
|
|
|
|
|
coerce => 1, |
|
59
|
|
|
|
|
|
|
multi => 1, |
|
60
|
|
|
|
|
|
|
uri => $doap->$_, |
|
61
|
|
|
|
|
|
|
gather_as => ['thanks'], |
|
62
|
|
|
|
|
|
|
) for qw( translator tester helper ); |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
has $_ => ( |
|
65
|
|
|
|
|
|
|
traits => [ WithURI ], |
|
66
|
|
|
|
|
|
|
is => 'ro', |
|
67
|
|
|
|
|
|
|
isa => Identifier, |
|
68
|
|
|
|
|
|
|
coerce => 1, |
|
69
|
|
|
|
|
|
|
uri => do { (my $x = $_) =~ s/_/-/g; $doap->$x }, |
|
70
|
|
|
|
|
|
|
) for qw( wiki bug_database mailing_list download_page ); |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
has $_ => ( |
|
73
|
|
|
|
|
|
|
traits => [ WithURI ], |
|
74
|
|
|
|
|
|
|
is => 'ro', |
|
75
|
|
|
|
|
|
|
isa => ArrayRef[Identifier], |
|
76
|
|
|
|
|
|
|
coerce => 1, |
|
77
|
|
|
|
|
|
|
uri => do { (my $x = $_) =~ s/_/-/g; $doap->$x }, |
|
78
|
|
|
|
|
|
|
multi => 1, |
|
79
|
|
|
|
|
|
|
) for qw( homepage old_homepage license download_mirror screenshots category support_forum developer_forum ); |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
has repository => ( |
|
82
|
|
|
|
|
|
|
traits => [ WithURI ], |
|
83
|
|
|
|
|
|
|
is => 'ro', |
|
84
|
|
|
|
|
|
|
isa => ArrayRef[Repository], |
|
85
|
|
|
|
|
|
|
coerce => 1, |
|
86
|
|
|
|
|
|
|
multi => 1, |
|
87
|
|
|
|
|
|
|
uri => $doap->repository, |
|
88
|
|
|
|
|
|
|
); |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
around homepage => sub { |
|
91
|
|
|
|
|
|
|
my ($orig, $self, @args) = (shift, shift, @_); |
|
92
|
|
|
|
|
|
|
if (@args) { |
|
93
|
|
|
|
|
|
|
return $self->$orig(@args); |
|
94
|
|
|
|
|
|
|
} |
|
95
|
|
|
|
|
|
|
else { |
|
96
|
|
|
|
|
|
|
return [ |
|
97
|
|
|
|
|
|
|
# de-prioritize metacpan links |
|
98
|
|
|
|
|
|
|
sort { |
|
99
|
|
|
|
|
|
|
("$a" =~ /metacpan/ && "$b" =~ /metacpan/) ? ("$a" cmp "$b") : |
|
100
|
|
|
|
|
|
|
("$a" =~ /metacpan/) ? 1 : |
|
101
|
|
|
|
|
|
|
("$b" =~ /metacpan/) ? -1 : ("$a" cmp "$b") |
|
102
|
|
|
|
|
|
|
} @{ $self->$orig() } |
|
103
|
|
|
|
|
|
|
]; |
|
104
|
|
|
|
|
|
|
} |
|
105
|
|
|
|
|
|
|
}; |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
{ |
|
108
|
|
|
|
|
|
|
my $class = shift; |
|
109
|
|
|
|
|
|
|
my ($model) = @_; |
|
110
|
0
|
|
|
0
|
0
|
0
|
map $class->rdf_load($_, $model), $model->subjects($rdf->type, $doap->Project); |
|
111
|
0
|
|
|
|
|
0
|
} |
|
112
|
0
|
|
|
|
|
0
|
|
|
113
|
|
|
|
|
|
|
{ |
|
114
|
|
|
|
|
|
|
require RDF::DOAP::Utils; |
|
115
|
|
|
|
|
|
|
my $self = shift; |
|
116
|
|
|
|
|
|
|
RDF::DOAP::Utils::gather_objects($self, 'maintainer'); |
|
117
|
0
|
|
|
0
|
0
|
0
|
} |
|
118
|
0
|
|
|
|
|
0
|
|
|
119
|
0
|
|
|
|
|
0
|
{ |
|
120
|
|
|
|
|
|
|
require RDF::DOAP::Utils; |
|
121
|
|
|
|
|
|
|
my $self = shift; |
|
122
|
|
|
|
|
|
|
RDF::DOAP::Utils::gather_objects($self, 'contributor'); |
|
123
|
|
|
|
|
|
|
} |
|
124
|
0
|
|
|
0
|
0
|
0
|
|
|
125
|
0
|
|
|
|
|
0
|
{ |
|
126
|
0
|
|
|
|
|
0
|
require RDF::DOAP::Utils; |
|
127
|
|
|
|
|
|
|
my $self = shift; |
|
128
|
|
|
|
|
|
|
RDF::DOAP::Utils::gather_objects($self, 'thanks'); |
|
129
|
|
|
|
|
|
|
} |
|
130
|
|
|
|
|
|
|
|
|
131
|
0
|
|
|
0
|
0
|
0
|
{ |
|
132
|
0
|
|
|
|
|
0
|
my $self = shift; |
|
133
|
0
|
|
|
|
|
0
|
my @rels = sort { |
|
134
|
|
|
|
|
|
|
($a->revision and $b->revision and version->parse($a->revision) cmp version->parse($b->revision)) or |
|
135
|
|
|
|
|
|
|
($a->issued and $b->issued and $a->issued cmp $b->issued) or |
|
136
|
|
|
|
|
|
|
($a->rdf_about and $b->rdf_about and $a->rdf_about->as_ntriples cmp $b->rdf_about->as_ntriples) |
|
137
|
|
|
|
|
|
|
} @{$self->release}; |
|
138
|
1
|
|
|
1
|
0
|
3
|
return \@rels; |
|
139
|
|
|
|
|
|
|
} |
|
140
|
12
|
0
|
0
|
|
|
258
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
141
|
|
|
|
|
|
|
{ |
|
142
|
|
|
|
|
|
|
my $self = shift; |
|
143
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
26
|
|
|
144
|
1
|
|
|
|
|
18
|
my @releases = @{ $self->sorted_releases }; |
|
145
|
|
|
|
|
|
|
my @filtered_releases; |
|
146
|
|
|
|
|
|
|
while (@releases) { |
|
147
|
|
|
|
|
|
|
my $next = shift @releases; |
|
148
|
|
|
|
|
|
|
if (@releases) { |
|
149
|
1
|
|
|
1
|
0
|
143
|
my $found_catchup = undef; |
|
150
|
|
|
|
|
|
|
for my $i (reverse(0 .. $#releases)) { |
|
151
|
1
|
|
|
|
|
4
|
for my $cs (@{ $releases[$i]->changesets || [] }) { |
|
|
1
|
|
|
|
|
9
|
|
|
152
|
1
|
|
|
|
|
3
|
if ($cs->has_versus and $cs->versus->revision eq $next->revision) { |
|
153
|
1
|
|
|
|
|
5
|
$found_catchup = $i; |
|
154
|
7
|
|
|
|
|
16
|
} |
|
155
|
7
|
100
|
|
|
|
15
|
} |
|
156
|
6
|
|
|
|
|
9
|
} |
|
157
|
6
|
|
|
|
|
14
|
if ($found_catchup) { |
|
158
|
26
|
50
|
|
|
|
32
|
my @intermediates = splice(@releases, 0, $found_catchup); |
|
|
26
|
|
|
|
|
513
|
|
|
159
|
26
|
100
|
100
|
|
|
602
|
push @filtered_releases, $next->changelog_section; |
|
160
|
1
|
|
|
|
|
4
|
push @filtered_releases, map $_->_changelog_section_header, @intermediates; |
|
161
|
|
|
|
|
|
|
} |
|
162
|
|
|
|
|
|
|
else { |
|
163
|
|
|
|
|
|
|
push @filtered_releases, $next->changelog_section; |
|
164
|
6
|
100
|
|
|
|
30
|
} |
|
165
|
1
|
|
|
|
|
4
|
} |
|
166
|
1
|
|
|
|
|
4
|
else { |
|
167
|
1
|
|
|
|
|
5
|
push @filtered_releases, $next->changelog_section; |
|
168
|
|
|
|
|
|
|
} |
|
169
|
|
|
|
|
|
|
} |
|
170
|
5
|
|
|
|
|
15
|
|
|
171
|
|
|
|
|
|
|
return join "\n", |
|
172
|
|
|
|
|
|
|
$self->_changelog_header, |
|
173
|
|
|
|
|
|
|
reverse @filtered_releases; |
|
174
|
1
|
|
|
|
|
4
|
} |
|
175
|
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
{ |
|
177
|
|
|
|
|
|
|
my $self = shift; |
|
178
|
1
|
|
|
|
|
7
|
my @lines = ( |
|
179
|
|
|
|
|
|
|
$self->name, |
|
180
|
|
|
|
|
|
|
("=" x length($self->name)), |
|
181
|
|
|
|
|
|
|
"", |
|
182
|
|
|
|
|
|
|
); |
|
183
|
|
|
|
|
|
|
push @lines, sprintf('%-14s%s', "$_->[0]:", $_->[1]) |
|
184
|
|
|
|
|
|
|
for grep defined($_->[1]), ( |
|
185
|
1
|
|
|
1
|
|
2
|
["Created" => $self->created], |
|
186
|
1
|
|
|
|
|
24
|
map(["Home page"=>$_], @{$self->homepage||[]}), |
|
187
|
|
|
|
|
|
|
["Bug tracker" => $self->bug_database], |
|
188
|
|
|
|
|
|
|
["Wiki" => $self->wiki], |
|
189
|
|
|
|
|
|
|
["Mailing list" => $self->mailing_list], |
|
190
|
|
|
|
|
|
|
map(["Maintainer"=>$_->to_string], @{$self->maintainer||[]}), |
|
191
|
|
|
|
|
|
|
); |
|
192
|
1
|
|
|
|
|
26
|
return join("\n", @lines)."\n"; |
|
193
|
|
|
|
|
|
|
} |
|
194
|
1
|
50
|
|
|
|
6
|
|
|
195
|
|
|
|
|
|
|
1; |