NAME
Gedcom::Record - a class to manipulate Gedcom records
Version 1.02 - 5th May 1999
SYNOPSIS
use Gedcom::Record;
return 0 unless $self->parse($record, $structures, $grammar, $callback)
$record->collect_xrefs($callback)
my $xref = $self->resolve_xref($self->{value})
my @famc = $self->resolve($self->child_values("FAMC"))
$record->resolve_xrefs($callback)
$record->unresolve_xrefs($callback)
return 0 unless $child->validate($self->{record}, $callback);
$record->renumber($args);
my $child = $record->child_value("NAME");
my @children = $record->child_values("CHIL");
print $record->summary, "\n";
DESCRIPTION
A selection of subroutines to handle records in a gedcom file.
Derived from Gedcom::Item.
HASH MEMBERS
Some of the more important hash members are:
$record->{renumbered}
Used by renumber().
$record->{recursed}
Used by renumber().
METHODS
parse
return 0 unless $self->parse($record, $structures, $grammar, $callback)
Parse a Gedcom record.
Match a Gedcom::Record against a Gedcom::Grammar. Warn of any mismatches, and associate the Gedcom::Grammar with the Gedcom::Record as $self->{grammar}. Do this recursively.
collect_xrefs
$record->collect_xrefs($callback)
Recursively collect all the xrefs. Called by Gedcom::collect_xrefs. $callback is not used yet.
resolve_xref
my $xref = $self->resolve_xref($value)
See Gedcom::resolve_xrefs()
resolve
my @famc = $self->resolve $self->child_values("FAMC")
For each argument, either return it or, if it an xref, return the referenced record.
resolve_xrefs
$record->resolve_xrefs($callback)
See Gedcom::resolve_xrefs()
unresolve_xrefs
$record->unresolve_xrefs($callback)
See Gedcom::unresolve_xrefs()
validate
return 0 unless $child->validate($self->{record}, $callback);
Validate the Gedcom::Record. This performs a number of consistency checks, but could do even more. $callback is not used yet.
Returns true iff the Record is valid.
renumber
$record->renumber($args);
Renumber the record.
See Gedcom::renumber().
child_value
my $child = $record->child_value("NAME");
Return the value of the specified child, or undef if the child could not be found. Calls get_child().
child_values
my @children = $record->child_values("CHIL");
Return a list of the values of the specified children. Calls get_children().
summary
print $record->summary, "\n";
Return a line of text summarising the record.