line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Trac::LinkResolver; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
63
|
use strict; |
|
9
|
|
|
|
|
21
|
|
|
9
|
|
|
|
|
251
|
|
4
|
9
|
|
|
9
|
|
47
|
use warnings; |
|
9
|
|
|
|
|
16
|
|
|
9
|
|
|
|
|
288
|
|
5
|
9
|
|
|
9
|
|
5056
|
use List::MoreUtils qw( any ); |
|
9
|
|
|
|
|
111118
|
|
|
9
|
|
|
|
|
52
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.22'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @handlers = qw( changeset wiki report log ticket milestone source attachment comment ); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
14463
|
|
|
14463
|
0
|
22471
|
my $class = shift; |
13
|
14463
|
|
|
|
|
27657
|
my $self = { context => shift }; |
14
|
14463
|
|
|
|
|
23123
|
bless $self, $class; |
15
|
14463
|
|
|
|
|
37649
|
$self->init; |
16
|
14463
|
|
|
|
|
26644
|
return $self; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _is_disabled { |
20
|
50
|
|
|
50
|
|
184
|
my ( $self, $resolver ) = @_; |
21
|
50
|
|
|
|
|
312
|
( my $formatter = ref $self ) =~ s/.*:://; |
22
|
|
|
|
|
|
|
|
23
|
50
|
100
|
|
|
|
107
|
if ( @{ $self->{context}->{enable_links} } ) { |
|
50
|
|
|
|
|
198
|
|
24
|
3
|
|
|
5
|
|
16
|
return !any { lcfirst($formatter) eq $_ } @{ $self->{context}->{enable_links} }; |
|
5
|
|
|
|
|
37
|
|
|
3
|
|
|
|
|
17
|
|
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
47
|
|
|
5
|
|
263
|
return any { lcfirst($formatter) eq $_ } @{ $self->{context}->{disable_links} }; |
|
5
|
|
|
|
|
38
|
|
|
47
|
|
|
|
|
373
|
|
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
1; |