line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Trac::LinkResolver; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
66
|
use strict; |
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
279
|
|
4
|
9
|
|
|
9
|
|
49
|
use warnings; |
|
9
|
|
|
|
|
31
|
|
|
9
|
|
|
|
|
259
|
|
5
|
9
|
|
|
9
|
|
5217
|
use List::MoreUtils qw( any ); |
|
9
|
|
|
|
|
112784
|
|
|
9
|
|
|
|
|
55
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.23'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @handlers = qw( changeset wiki report log ticket milestone source attachment comment ); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
14463
|
|
|
14463
|
0
|
21989
|
my $class = shift; |
13
|
14463
|
|
|
|
|
28375
|
my $self = { context => shift }; |
14
|
14463
|
|
|
|
|
23803
|
bless $self, $class; |
15
|
14463
|
|
|
|
|
37886
|
$self->init; |
16
|
14463
|
|
|
|
|
25545
|
return $self; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _is_disabled { |
20
|
50
|
|
|
50
|
|
125
|
my ( $self, $resolver ) = @_; |
21
|
50
|
|
|
|
|
332
|
( my $formatter = ref $self ) =~ s/.*:://; |
22
|
|
|
|
|
|
|
|
23
|
50
|
100
|
|
|
|
96
|
if ( @{ $self->{context}->{enable_links} } ) { |
|
50
|
|
|
|
|
184
|
|
24
|
3
|
|
|
5
|
|
17
|
return !any { lcfirst($formatter) eq $_ } @{ $self->{context}->{enable_links} }; |
|
5
|
|
|
|
|
40
|
|
|
3
|
|
|
|
|
20
|
|
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
47
|
|
|
5
|
|
264
|
return any { lcfirst($formatter) eq $_ } @{ $self->{context}->{disable_links} }; |
|
5
|
|
|
|
|
41
|
|
|
47
|
|
|
|
|
373
|
|
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
1; |