/usr/share/perl5/Text/Trac/LinkResolver.pm is in libtext-trac-perl 0.15-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | package Text::Trac::LinkResolver;
use strict;
use warnings;
use List::MoreUtils qw( any );
our @handlers = qw( changeset wiki report log ticket milestone source attachment comment );
sub new {
my $class = shift;
my $self = { context => shift };
bless $self, $class;
$self->init;
return $self;
}
sub _is_disabled {
my ( $self, $resolver ) = @_;
( my $formatter = ref $self ) =~ s/.*:://;
if ( @{ $self->{context}->{enable_links} } ) {
return !any { lcfirst($formatter) eq $_ } @{ $self->{context}->{enable_links} };
}
return any { lcfirst($formatter) eq $_ } @{ $self->{context}->{disable_links} };
}
1;
|