Gedcom::Grammar(3pm)
π Gedcom::Grammar π
okay bestie, so this is the manual page for Gedcom::Grammar β it lives in section 3pm of the User Contributed Perl Documentation, and it's a whole module for messing with GEDCOM grammars β¨
Version 1.22 - 15th November 2019
β¨ NAME β¨
Gedcom::Grammar β a module to manipulate GEDCOM grammars π¦
Version 1.22 - 15th November 2019
πΈ SYNOPSIS πΈ
use Gedcom::Grammar;
my $st = $grammar->structure("GEDCOM");
my @sgr = $grammar->item("DATE");
my @items = $grammar->valid_items;
my $min = $grammar->min;
my $max = $grammar->max;
my @items = $grammar->items;
π DESCRIPTION π
It's a lil collection of subroutines that handle the grammar of a GEDCOM file. Lowkey iconic, ngl.
It's derived from Gedcom::Item. π
π HASH MEMBERS π
Some of the more important hash members are giving main character energy:
$grammar->{top}β the top of the grammar tree π³$grammar->{top}{structures}β a reference to a hash that maps the names of all the structures to the grammar objects β¨
π«Ά METHODS π«Ά
structures
my $st = $grammar->structure("GEDCOM");
Returns the grammar item of the structure you asked for β but like, only if it actually exists, otherwise you get undef. π
item
my @sgr = $grammar->item("DATE");
Returns a list of the possible grammar items of the sub-item you specified, if it exists. π
min
my $min = $grammar->min;
Returns the minimum permissible number of $grammar items. π’
max
my $max = $grammar->max;
Returns the maximum permissible number of $grammar items. π’
items
my @items = $grammar->items;
Returns a list of tags of the grammar's sub-items π·οΈ
valid_items
my @items = $grammar->valid_items;
Returns a hash detailing all the valid sub-items of the grammar item. The key is the tag of the sub-item, and the value is an array of hashes with three members:
grammar => the sub-item grammar
min => the minimum permissible number of these sub-items
max => the maximum permissible number of these sub-items
likeβ¦ three lil facts per sub-item, no cap. π
sf cute, bestie β that's the whole page π go forth and grammar
this page came to you via perl v5.36.0, dated 2022-10-16, and it's Gedcom::Grammar(3pm). mwah π
β¨
π¦ where this page comes from
- ubuntu noble: libgedcom-perl 1.22-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgedcom-perl 1.22-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgedcom-perl 1.22-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms