This file is indexed.

/usr/share/perl5/Text/Trac.pm is in libtext-trac-perl 0.18-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
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
package Text::Trac;

use strict;
use warnings;

use Text::Trac::Context;
use Text::Trac::BlockNode;

our $VERSION = '0.18';

my %Defaults = (
	html              => '',
	permalink         => '',
	min_heading_level => 1,
	class             => 1,
);

sub new {
	my ( $class, %args ) = @_;

	my $self = { %Defaults, %args, };

	bless $self, $class;
}

sub parse {
	my $self = shift;
	my $text = shift or return;

	$self->{trac_url} = '/' unless defined $self->{trac_url};
	for ( keys %$self ) {
		if ( $_ =~ /^trac.+url$/ ) {
			$self->{$_} .= '/' if $self->{$_} !~ m!/$!;
		}
	}

	my $c = Text::Trac::Context->new(
		{
			%$self, text => $text,
		}
	);

	my $node = Text::Trac::BlockNode->new(
		{
			context => $c,
		}
	);
	$node->parse;

	$self->{html} = $c->html;
}

sub html { $_[0]->{html}; }

*process = \&parse;

1;
__END__

=head1 NAME

Text::Trac - Perl extension for formatting text with Trac Wiki Style.

=head1 SYNOPSIS

    use Text::Trac;

    my $parser = Text::Trac->new(
        trac_url      => 'http://trac.mizzy.org/public/',
        disable_links => [ qw( changeset ticket ) ],
    );

    $parser->parse($text);

    print $parser->html;

=head1 DESCRIPTION

Text::Trac parses text with Trac WikiFormatting and convert it to html format.

=head1 METHODS

=head2 new

Constructs Text::Trac object.

Available arguments are:


=head3 trac_url

Base URL for TracLinks.Default is /. You can specify each type of URL individually.
Available URLs are:

=over

=item trac_attachment_url

=item trac_changeset_url

=item trac_log_url

=item trac_milestone_url

=item trac_report_url

=item trac_source_url

=item trac_ticket_url

=item trac_wiki_url

=back

=head3 disable_links

Specify TracLink types you want to disable.
All types are enabled if you don't specify this option.

    my $parser = Text::Trac->new(
        disable_links => [ qw( changeset ticket ) ],
    );

=head3 enable_links

Specify TracLink types you want to enable.Other types are disabled.
You cannot use both disable_links and enable_links at once.

    my $parser = Text::Trac->new(
        enable_links => [ qw( changeset ticket ) ],
    );



=head2 parse

Parses text and converts it to html format.

=head2 process

An alias of parse method.

=head2 html

Return converted html string.

=head1 SEE ALSO

=over 3

=item  L<Text::Hatena>

=item  Trac L<http://www.edgewall.com/trac/>

=item  Trac WikiFormatting L<http://projects.edgewall.com/trac/wiki/WikiFormatting>

=back

=head1 AUTHORS

Gosuke Miyashita, C<< <gosukenator at gmail.com> >>

Hideaki Tanaka, C<< <drawn.boy at gmail.com)> >>

=head1 BUGS

Please report any bugs or feature requests to
C<bug-text-trac at rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Text-Trac>.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.

=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Text::Trac

You can also look for information at:

=over 4

=item * AnnoCPAN: Annotated CPAN documentation

L<http://annocpan.org/dist/Text-Trac>

=item * CPAN Ratings

L<http://cpanratings.perl.org/d/Text-Trac>

=item * RT: CPAN's request tracker

L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Text-Trac>

=item * Search CPAN

L<http://search.cpan.org/dist/Text-Trac>

=back

=head1 COPYRIGHT & LICENSE

Copyright 2006 Gosuke Miyashita, all rights reserved.

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

=cut