This file is indexed.

/usr/share/perl5/Kwiki/Registry.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
package Kwiki::Registry;
use Spoon::Registry '-Base';

sub add {
    my ($key, $value) = @_;
    return super
      unless $key eq 'preference' and @_ == 2;
    super($key, $value->id, object => $value);
}

sub not_a_plugin {
    my $class_name = shift;
    die <<END;

Error:
$class_name is not a plugin class.
see: http://www.kwiki.org/?InstallingPlugins
END
}

sub plugin_redefined {
    my ($class_id, $class_name, $prev_name) = @_;
    die <<END if $class_name eq $prev_name;

Error:
Plugin class $class_name defined twice.
see: http://www.kwiki.org/?InstallingPlugins
END
    die <<END;

Error:
Can't use two plugins with the same class id.
$prev_name and $class_name both have a class id of '$class_id'.
see: http://www.kwiki.org/?InstallingPlugins
END
}

sub validate {
    $self->validate_prerequisite or return;
    return 1;
}

sub validate_prerequisite {
    for my $hashlet (@{$self->lookup->{plugins}}) {
        my $class_id = $hashlet->{id};
        my $prereqs = $self->lookup->{add_order}{$class_id}{prerequisite}
          or next;
        for my $prereq (@$prereqs) {
            $self->missing_prerequisite($class_id, $prereq)
              unless defined $self->lookup->{classes}{$prereq};
        }
    }
    return 1;
}

sub missing_prerequisite {
    my ($class_id, $prereq) = @_;
    my $class_name = $self->lookup->{classes}{$class_id};
    die "Missing prerequisite plugin '$prereq' for $class_name\n";
}

__DATA__

=head1 NAME

Kwiki::Registry - Kwiki Registry Base Class

=head1 SYNOPSIS

=head1 DESCRIPTION

=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