Gedcom::Grammar(3pm)

πŸ“¦
version 1.22 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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