| 1 | package Text::Trac::LinkResolver; | ||||||||||
| 2 | |||||||||||
| 3 | 53 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 53 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 53 | ▶ | use List::MoreUtils qw( any ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 53 | our $VERSION = '0.23'; | |||||||||
| 8 | |||||||||||
| 9 | 53 | our @handlers = qw( changeset wiki report log ticket milestone source attachment comment ); | |||||||||
| 10 | |||||||||||
| 11 | sub new { | ||||||||||
| 12 | 49158 | ▶ | my $class = shift; | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 13 | 49158 | my $self = { context => shift }; | |||||||||
| 14 | 49158 | bless $self, $class; | |||||||||
| 15 | 49158 | $self->init; | |||||||||
| 16 | 49158 | return $self; | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | sub _is_disabled { | ||||||||||
| 20 | 516 | ▶ | my ( $self, $resolver ) = @_; | ||||||||
|
Subroutine
_is_disabled: called CC=2 SCAR=6.9
| |||||||||||
| 21 | 516 | ( my $formatter = ref $self ) =~ s/.*:://; | |||||||||
| 22 | |||||||||||
| 23 | 516 | ▶ | if ( @{ $self->{context}->{enable_links} } ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | 3 | ▶ | return !any { lcfirst($formatter) eq $_ } @{ $self->{context}->{enable_links} }; | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 513 | ▶ | return any { lcfirst($formatter) eq $_ } @{ $self->{context}->{disable_links} }; | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 28 | } | ||||||||||
| 29 | 53 | 1; | |||||||||