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
|
|
14
|
extends qw(RDF::DOAP::Resource); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
10
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use overload |
9
|
|
|
|
|
|
|
q[""] => sub { shift->to_string }, |
10
|
20
|
|
|
20
|
|
176
|
fallback => 1; |
11
|
2
|
|
|
2
|
|
10811
|
|
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
23
|
|
12
|
|
|
|
|
|
|
use RDF::DOAP::Types -types; |
13
|
2
|
|
|
2
|
|
903
|
use RDF::DOAP::Utils -traits; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
20
|
|
14
|
2
|
|
|
2
|
|
11994
|
|
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
29
|
|
15
|
|
|
|
|
|
|
use RDF::Trine::Namespace qw(rdf rdfs owl xsd); |
16
|
2
|
|
|
2
|
|
792
|
my $foaf = 'RDF::Trine::Namespace'->new('http://xmlns.com/foaf/0.1/'); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
44
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has $_ => ( |
19
|
|
|
|
|
|
|
traits => [ WithURI ], |
20
|
|
|
|
|
|
|
is => 'ro', |
21
|
|
|
|
|
|
|
isa => String, |
22
|
|
|
|
|
|
|
coerce => 1, |
23
|
|
|
|
|
|
|
uri => $foaf->$_, |
24
|
|
|
|
|
|
|
) for qw( name nick ); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
has mbox => ( |
27
|
|
|
|
|
|
|
traits => [ WithURI ], |
28
|
|
|
|
|
|
|
is => 'ro', |
29
|
|
|
|
|
|
|
isa => ArrayRef[Identifier], |
30
|
|
|
|
|
|
|
coerce => 1, |
31
|
|
|
|
|
|
|
uri => $foaf->mbox, |
32
|
|
|
|
|
|
|
multi => 1, |
33
|
|
|
|
|
|
|
lazy => 1, |
34
|
|
|
|
|
|
|
builder => '_build_mbox', |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
has cpanid => ( |
38
|
|
|
|
|
|
|
is => 'ro', |
39
|
|
|
|
|
|
|
isa => Maybe[Str], |
40
|
|
|
|
|
|
|
lazy => 1, |
41
|
|
|
|
|
|
|
builder => '_build_cpanid', |
42
|
|
|
|
|
|
|
); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
{ |
45
|
|
|
|
|
|
|
my $self = shift; |
46
|
|
|
|
|
|
|
return unless $self->has_rdf_about; |
47
|
3
|
|
|
3
|
|
7
|
return unless $self->rdf_about->is_resource; |
48
|
3
|
50
|
|
|
|
80
|
$self->rdf_about->uri =~ m{^http://purl\.org/NET/cpan-uri/person/(\w+)$} |
49
|
3
|
100
|
|
|
|
72
|
and return $1; |
50
|
2
|
50
|
|
|
|
62
|
return; |
51
|
|
|
|
|
|
|
} |
52
|
0
|
|
|
|
|
0
|
|
53
|
|
|
|
|
|
|
{ |
54
|
|
|
|
|
|
|
my $self = shift; |
55
|
|
|
|
|
|
|
return [sprintf('mailto:%s@cpan.org', $self->cpanid)] |
56
|
|
|
|
|
|
|
if defined $self->cpanid; |
57
|
1
|
|
|
1
|
|
2
|
return []; |
58
|
1
|
50
|
|
|
|
22
|
} |
59
|
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
0
|
{ |
61
|
|
|
|
|
|
|
my $self = shift; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
return $self->name |
64
|
|
|
|
|
|
|
|| $self->nick |
65
|
23
|
|
|
23
|
0
|
29
|
|| $self->cpanid |
66
|
|
|
|
|
|
|
|| ($self->mbox && $self->mbox->[0]->uri) |
67
|
23
|
100
|
0
|
|
|
92
|
|| ($self->rdf_about && $self->rdf_about->uri) |
|
|
|
66
|
|
|
|
|
68
|
|
|
|
|
|
|
|| 'Anonymous' |
69
|
|
|
|
|
|
|
if @_ && $_[0] eq 'compact'; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
my @parts; |
72
|
|
|
|
|
|
|
if ($self->name) |
73
|
|
|
|
|
|
|
{ |
74
|
|
|
|
|
|
|
push @parts, $self->name; |
75
|
21
|
|
|
|
|
26
|
if ($self->cpanid) |
76
|
21
|
50
|
|
|
|
447
|
{ |
77
|
|
|
|
|
|
|
push @parts, sprintf('(%s)', uc $self->cpanid); |
78
|
21
|
|
|
|
|
384
|
} |
79
|
21
|
100
|
|
|
|
432
|
} |
80
|
|
|
|
|
|
|
else |
81
|
20
|
|
|
|
|
376
|
{ |
82
|
|
|
|
|
|
|
my $nick = uc($self->nick) || uc($self->cpanid); |
83
|
|
|
|
|
|
|
push @parts, $nick if $nick; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
0
|
|
0
|
|
|
0
|
for my $mbox (@{$self->mbox}) |
87
|
0
|
0
|
|
|
|
0
|
{ |
88
|
|
|
|
|
|
|
if ($mbox and $mbox->uri =~ /^mailto:(.+)$/) |
89
|
|
|
|
|
|
|
{ |
90
|
21
|
|
|
|
|
38
|
push @parts, "<$1>"; |
|
21
|
|
|
|
|
404
|
|
91
|
|
|
|
|
|
|
last; |
92
|
21
|
50
|
33
|
|
|
62
|
} |
93
|
|
|
|
|
|
|
} |
94
|
21
|
|
|
|
|
719
|
|
95
|
21
|
|
|
|
|
36
|
for my $mbox (@{$self->mbox}) |
96
|
|
|
|
|
|
|
{ |
97
|
|
|
|
|
|
|
push @parts, $mbox if !@parts; |
98
|
|
|
|
|
|
|
} |
99
|
21
|
|
|
|
|
34
|
|
|
21
|
|
|
|
|
424
|
|
100
|
|
|
|
|
|
|
push @parts, $self->rdf_about if !@parts && $self->has_rdf_about; |
101
|
21
|
50
|
|
|
|
56
|
|
102
|
|
|
|
|
|
|
join(" ", grep !!$_, @parts) or 'Anonymous'; |
103
|
|
|
|
|
|
|
} |
104
|
21
|
50
|
33
|
|
|
46
|
|
105
|
|
|
|
|
|
|
1; |