This file is indexed.

/usr/share/perl5/Gedcom/CGI.pm is in libgedcom-perl 1.20-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
# Copyright 2001-2013, Paul Johnson (paul@pjcj.net)

# This software is free.  It is licensed under the same terms as Perl itself.

# The latest version of this software should be available from my homepage:
# http://www.pjcj.net

# documentation at __END__

use strict;

require 5.005;

package Gedcom::CGI;

use CGI qw(:cgi :html);

use Gedcom 1.20;

use vars qw($VERSION);
$VERSION = "1.20";

sub gedcom {
    my ($gedcom_file) = @_;
    $gedcom_file = "/var/www/Gedcom/$gedcom_file.ged";
    Gedcom->new(gedcom_file => $gedcom_file, read_only => 1);
}

sub dates {
    my ($i) = @_;
    "(" . ($i->get_value("birth date") || "") . " - "
    . ($i->get_value("death date") || "") . ")"
}

sub indi_link {
    my ($g, $i) = @_;
    return p("Unknown") unless $i;
    p(
        a({-href => "/cgi-bin/gedcom.cgi?op=indi&gedcom=$g&indi=" . $i->xref},
            $i->cased_name) .
        " " . dates($i)
    )
}

sub main {
    my $gedcom = param("gedcom");
    my $ged = gedcom($gedcom);
    print header,
          start_html,
          h1($gedcom),
          map(indi_link($gedcom, $_), $ged->individuals),
          end_html;
}

sub event_row {
    my ($n, @e) = @_;
    map td([
        $n,
        $_->get_value("date")  || "-",
        $_->get_value("place") || "-",
    ]), @e
}

sub indi_row {
    my ($g, $n, @i) = @_;
    map td([
        $n,
        a(
            {-href => "/cgi-bin/gedcom.cgi?op=indi&gedcom=$g&indi=" . $_->xref},
            $_->cased_name
        ),
        $_->get_value("birth date") || "-",
        $_->get_value("death date") || "-",
    ]), @i
}

sub indi {
    my $gedcom = param("gedcom");
    my $indi   = param("indi");
    my $ged    = gedcom($gedcom);
    my $i      = $ged->get_individual($indi);
    my $name   = $i->cased_name;
    my $sex    = uc $i->sex;
    my $spouse = $sex eq "M" ? "wife" : $sex eq "F" ? "husband" : "spouse";

    print
        header,
        start_html(-title => $name),
        h1($name),
        table(
            { -border => undef },
            Tr(
                { align => "CENTER", valign => "TOP" },
                [
                    th([ "Event", "Date", "Place"]),
                    event_row("Birth",       $i->birth),
                    event_row("Christening", $i->christening),
                    event_row("Baptism",     $i->baptism),
                    event_row("Baptism",     $i->bapl),
                    event_row("Endowment",   $i->endowment),
                    event_row("Death",       $i->death),
                    event_row("Burial",      $i->burial),
                    event_row("Marriage",    $i->get_record(qw(fams marriage))),
                ]
            )
        ),
        p,
        table(
            { -border => undef },
            Tr(
                { align => "CENTER", valign => "TOP" },
                [
                    th([ "Relation", "Name", "Birth", "Death"]),
                    indi_row($gedcom, ucfirst $spouse ,$i->$spouse()),
                    indi_row($gedcom, "Father", $i->father),
                    indi_row($gedcom, "Mother", $i->mother),
                    indi_row($gedcom, "Child",  $i->children),
                ]
            )
        ),
        p(a({-href => "/cgi-bin/gedcom.cgi?op=main&gedcom=$gedcom"}, $gedcom)),
        end_html;
}

1;

__END__

=head1 NAME

Gedcom::CGI - Basic CGI routines for Gedcom.pm

Version 1.20 - 17th September 2017

=head1 SYNOPSIS

  use Gedcom::CGI;

=head1 DESCRIPTION

=head1 METHODS

=cut