This file is indexed.

/usr/share/perl5/Kwiki/Config.pm is in libkwiki-perl 0.39-2.

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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
package Kwiki::Config;
use Spoon::Config -Base;
use mixin 'Kwiki::Installer';

const class_id => 'config';
const class_title => 'Kwiki Configuration';
const config_file => 'config.yaml';
field script_name => '';
const default_path => [ 'config' ];
field path => [];
field plugins_file => '';

sub init {
    $self->add_path(@{$self->default_path});
    $self->add_file($self->config_file);
}

sub paired_arguments { qw(-plugins) }
sub new {
    my ($args, @configs) = $self->parse_arguments(@_);
    $self = super(@configs);
    if (my $plugins_file = $args->{-plugins}) {
        $self->add_plugins_file($plugins_file);
        $self->plugins_file($plugins_file);
    }
    return $self;
}

sub add_plugins_file {
    my $plugins_file = shift;
    return unless -f $plugins_file;
    $self->add_config(
        {
            plugin_classes => [ $self->read_plugins($plugins_file) ],
        }
    );
}

sub read_plugins {
    my $plugins_file = io(shift);
    my @plugins = grep {
        s/^([\+\-]?[\w\:]+)\s*$/$1/;
    } $plugins_file->slurp;
    return @plugins unless grep /^[\+\-]/, @plugins or not @plugins;
    my $filename = $plugins_file->filename;
    die "Can't create plugins list"
      unless -e "../$filename";
    my $updir = io->updir->chdir;
    my @parent_plugins = $self->read_plugins($filename);
    for (@plugins) {
        my $remove = $_;
        $remove =~ s/^\-// or next;
        @parent_plugins = grep {$_ ne $remove} @parent_plugins;
    }
    my %have;
    @have{@parent_plugins} = ('1') x @parent_plugins;
    return @parent_plugins, grep {
        not /^\-/ and do {
            s/^\+//;
            not $have{$_};
        }
    } @plugins;
}

sub default_classes {
    (
        cgi_class => 'Kwiki::CGI',
        command_class => 'Kwiki::Command',
        config_class => 'Kwiki::Config',
        cookie_class => 'Kwiki::Cookie',
        css_class => 'Kwiki::CSS',
        files_class => 'Kwiki::Files',
        formatter_class => 'Kwiki::Formatter',
        headers_class => 'Spoon::Headers',
        hooks_class => 'Spoon::Hooks',
        hub_class => 'Kwiki::Hub',
        javascript_class => 'Kwiki::Javascript',
        pages_class => 'Kwiki::Pages',
        preferences_class => 'Kwiki::Preferences',
        registry_class => 'Kwiki::Registry',
        template_class => 'Kwiki::Template::TT2',
        users_class => 'Kwiki::Users',
    )
}

sub add_plugin {
    push @{$self->plugin_classes}, shift;
}

sub change_plugin {
    my ($new_class, $old_class) = @_;
    my $pattern = $old_class || do {
        my $temp = $new_class;
        $temp =~ s/^\w+:://;
        '\w+::' . $temp;
    };
    my $plugins = $self->plugin_classes;
    for (@$plugins) {
        last if s/$pattern/$new_class/;
    }
}

sub add_file {
    my $file = shift
      or return;
    my $file_path = '';
    for (@{$self->path}) {
        $file_path = "$_/$file", last
          if -f "$_/$file";
    }
    return unless $file_path;
    my $hash = $self->hash_from_file($file_path);
    for my $key (keys %$hash) {
        next if defined $self->{$key};
        field $key;
        $self->{$key} = $hash->{$key};
    }
}

sub add_path {
    splice @{$self->path}, 0, 0, @_;
}

sub get_packed_files {
    my @return;
    my @packed = super;
    while (my ($name, $content) = splice(@packed, 0, 2)) {
        if ($name =~ /^(plugins|config\.yaml)$/) {
            next if -f $name;
        }
        push @return, $name, $content;
    }
    @return;
}

__DATA__

=head1 NAME 

Kwiki::Config - Kwiki Configuration Base Class

=head1 SYNOPSIS

    $self->hub->config->main_page;
    $self->config->site_title;

In templates:

    [% hub.config.script_name %]

=head1 DESCRIPTION

This class defines a singleton object that contains all the various
configuration values in your kwiki system. The configuration values come
from many different places.

=head1 AUTHOR

Brian Ingerson <INGY@cpan.org>

=head1 COPYRIGHT

Copyright (c) 2004. Brian Ingerson. All rights reserved.

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

See http://www.perl.com/perl/misc/Artistic.html

=cut

__config/config.yaml__
# DO NOT EDIT THIS FILE
# Put overrides in the top level config.yaml
# See: http://www.kwiki.org/?ChangingConfigDotYaml
#
site_title: Kwiki
main_page: HomePage
database_directory: database
logo_image: palm90.png
script_name: index.cgi
__!config.yaml__
# Put all local overrides/modifications to the config/* files in this
# file. Do not modify any of the files under the config/ directory as
# they will be overwritten by subsequent upgrades to Kwiki modules.
# See: http://www.kwiki.org/?ChangingConfigDotYaml
#
logo_image: palm90.png
__!plugins__
# This is a list of all the plugins your Kwiki is currently set up to
# use. Modify this list to suit your needs. After modification, run
# 'kwiki -update' to make the changes live. Alternately use 
# 'kwiki -add ...', 'kwiki -remove ...', and 'kwiki -install ...' to
# manage this list for you.

# See http://www.kwiki.org/InstallingPlugins for more information.

# These are the bare bones plugins necessary for an editable Kwiki:
Kwiki::Display
Kwiki::Edit
Kwiki::Theme::Basic
Kwiki::Toolbar
Kwiki::Status
Kwiki::Widgets

# These are very common plugins. You'll need to install them (as
# separate CPAN modules) first.
# Kwiki::RecentChanges
# Kwiki::Archive::Rcs
# Kwiki::Revisions
# Kwiki::UserPreferences
# Kwiki::UserName
# Kwiki::Search
# Kwiki::Icons::Gnome
# Kwiki::TimeZone
# Kwiki::NewPage
# Kwiki::BreadCrumbs

# Theme plugins:
# Kwiki::Theme::Basic
# Kwiki::Theme::Klassik
# Kwiki::Theme::ColumnLayout
# Kwiki::Theme::HLB
# Kwiki::Theme::TabNav

# Icon Set plugins:
# Kwiki::Icons::Gnome
# Kwiki::Icons::Crystal

# Archive plugins:
# Kwiki::Archive::Rcs
# Kwiki::Archive::SVK
# Kwiki::Archive::Cvs

# WARNING: THIS FOLOWING SECTION OF PLUGINS SHOULD NOT BE MADE AVAILABLE
# TO A PUBLICLY ACCESSABLE SITE! They offer capabilities which only the
# site administrator should have access to. Install these plugins in a
# password protected view of your kwiki. See
# http://www.kwiki.org/AdminView for more information.
#
# Site Administrator plugins:
# Kwiki::DeletePage
# Kwiki::PageInfo
# Kwiki::PagePrivacy

# Anti WikiSpam plugins:
# Kwiki::ExternalLinkWhitelist
# Kwiki::AccessBlacklist
# Kwiki::Scode

# WAFL Syntax Extension plugins:
# Kwiki::Comments
# Kwiki::ConfigBlocks
# Kwiki::DMOZLink
# Kwiki::GoogleLink
# Kwiki::IRCMode
# Kwiki::Image
# Kwiki::ParagraphBlocks
# Kwiki::PerlTidyBlocks
# Kwiki::PerlTidyModule
# Kwiki::PodBlocks
# Kwiki::PreformattedBlocks
# Kwiki::ShellBlocks
# Kwiki::ShortcutLinks
# Kwiki::VimMode

# Other plugins:
# Kwiki::Atom
# Kwiki::AuthorOnlyPageEditing
# Kwiki::Autoformat
# Kwiki::Diff
# Kwiki::Edit::RequireUserName
# Kwiki::Edit::SubEtha
# Kwiki::Email
# Kwiki::Favorites
# Kwiki::GDGraphGenerator
# Kwiki::GuestBook
# Kwiki::HanConvert
# Kwiki::Infobox
# Kwiki::LiveSearch
# Kwiki::MindMap
# Kwiki::ModPerl
# Kwiki::Notify::IRC
# Kwiki::Notify::Mail
# Kwiki::Outline2Html
# Kwiki::PageInclude
# Kwiki::PagePrivacy
# Kwiki::PageTemplate
# Kwiki::Pages::Perldoc
# Kwiki::RecentChanges::Atom
# Kwiki::RecentChangesRSS
# Kwiki::ReferrerLog
# Kwiki::SocialMap
# Kwiki::Spork
# Kwiki::Toolbar::List
# Kwiki::Users::Remote
# Kwiki::Weather
# Kwiki::Zipcode