line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Trac::LinkResolver; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
53
|
use strict; |
|
9
|
|
|
|
|
15
|
|
|
9
|
|
|
|
|
234
|
|
4
|
9
|
|
|
9
|
|
37
|
use warnings; |
|
9
|
|
|
|
|
15
|
|
|
9
|
|
|
|
|
198
|
|
5
|
9
|
|
|
9
|
|
4138
|
use List::MoreUtils qw( any ); |
|
9
|
|
|
|
|
93926
|
|
|
9
|
|
|
|
|
50
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.24'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @handlers = qw( changeset wiki report log ticket milestone source attachment comment ); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
14463
|
|
|
14463
|
0
|
18503
|
my $class = shift; |
13
|
14463
|
|
|
|
|
23301
|
my $self = { context => shift }; |
14
|
14463
|
|
|
|
|
19466
|
bless $self, $class; |
15
|
14463
|
|
|
|
|
31908
|
$self->init; |
16
|
14463
|
|
|
|
|
21729
|
return $self; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _is_disabled { |
20
|
50
|
|
|
50
|
|
137
|
my ( $self, $resolver ) = @_; |
21
|
50
|
|
|
|
|
275
|
( my $formatter = ref $self ) =~ s/.*:://; |
22
|
|
|
|
|
|
|
|
23
|
50
|
100
|
|
|
|
118
|
if ( @{ $self->{context}->{enable_links} } ) { |
|
50
|
|
|
|
|
171
|
|
24
|
3
|
|
|
5
|
|
17
|
return !any { lcfirst($formatter) eq $_ } @{ $self->{context}->{enable_links} }; |
|
5
|
|
|
|
|
36
|
|
|
3
|
|
|
|
|
23
|
|
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
47
|
|
|
5
|
|
258
|
return any { lcfirst($formatter) eq $_ } @{ $self->{context}->{disable_links} }; |
|
5
|
|
|
|
|
33
|
|
|
47
|
|
|
|
|
336
|
|
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
1; |