Gedcom...vidual(3pm)

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

πŸ’– NAME πŸ’–

Gedcom::Individual β€” a whole module whose entire job is handling GEDCOM individuals, bestie. Like, one (1) person in your family tree, but make it a whole blessed object.

Version 1.22 β€” 15th November 2019 ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so first you pull the module in, and then it's just vibes and method calls:

use Gedcom::Individual;

my $name = $i->name;
my $cased_name = $i->cased_name;
my $surname = $i->surname;
my $given_names = $i->given_names;
my $soundex = $i->soundex;
my $sex = $i->sex;
my @rel = $i->father;
my @rel = $i->mother;
my @rel = $i->parents;
my @rel = $i->husband;
my @rel = $i->wife;
my @rel = $i->spouse;
my @rel = $i->siblings;
my @rel = $i->half_siblings;
my @rel = $i->brothers;
my @rel = $i->half_brothers;
my @rel = $i->sisters;
my @rel = $i->half_sisters;
my @rel = $i->children;
my @rel = $i->sons;
my @rel = $i->daughters;
my @rel = $i->descendents;
my @rel = $i->ancestors;
my $ok  = $i->delete;

my @fam = $i->famc;
my @fam = $i->fams;

🌸 DESCRIPTION 🌸

A curated little selection of subroutines for wrangling individuals inside a GEDCOM file. That's it, that's the whole deal πŸ’…

She is derived from Gedcom::Record, so she came from somewhere iconic, obviously. πŸ‘‘


✨ HASH MEMBERS ✨

None.

Nothing. Zero. Nada. Not a single one, bestie, no cap. πŸ™ˆ


πŸŽ€ METHODS πŸŽ€

πŸ’• name

my $name = $i->name;

Hands you back the name of the individual β€” and yes, the spaces get normalised on the way out. tidy queen. ✨


πŸ’• cased_name

my $cased_name = $i->cased_name;

Same energy as name, spaces normalised and all, but the surname gets shouted in UPPER CASE. very "MAIN CHARACTER" of the surname honestly. πŸ‘‘


πŸ’• surname

my $surname = $i->surname;

Returns the surname of the individual. just the surname. that's her. πŸŽ€


πŸ’• given_names

my $given_names = $i->given_names;

Returns the given names of the individual, with spaces normalised. the given names stay lowercase-casual, as they should. 🌸


πŸ’• soundex

my $soundex = $i->soundex;

Returns the soundex code of the individual. πŸ¦‹

⚠️ heads up bestie: this function is only available if Text::Soundex.pm is available. no module, no soundex, and that's just the law. πŸ’€

πŸ’• sex

my $sex = $i->sex;

Returns the sex of the individual. The options are "M", "F" or "U". three (3) letters carrying the whole vibe check, periodt. πŸ’…


🫢 Individual functions 🫢

my @rel = $i->father;
my @rel = $i->mother;
my @rel = $i->parents;
my @rel = $i->husband;
my @rel = $i->wife;
my @rel = $i->spouse;
my @rel = $i->siblings;
my @rel = $i->half_siblings;
my @rel = $i->older_siblings;
my @rel = $i->younger_siblings;
my @rel = $i->brothers;
my @rel = $i->half_brothers;
my @rel = $i->sisters;
my @rel = $i->half_sisters;
my @rel = $i->children;
my @rel = $i->sons;
my @rel = $i->daughters;
my @rel = $i->descendents;
my @rel = $i->ancestors;

Returns a list of individuals who are related to $i. πŸ’ž

And listen, this is the important part: every function returns a list β€” even the ones with a singular name like father(). You get a list of individuals holding that relation to $i. Yes, even father. Plural by default, always. πŸ”₯

Need something more complicated than that? The map function ate and left no crumbs, fr fr. for example:

my @grandparents = map { $_->parents } $i->parents;

look at her go 🧚


πŸ’• delete

my $ok  = $i->delete;

Deletes $i out of the data structure. gone. poof. πŸ’€

This function will also set $i to undef β€” and that's not her being messy, that's a little reminder that the individual cannot be used again. she's in the past now, bestie. 🫢

Returns true if $i was successfully deleted. βœ…


🫢 Family functions 🫢

my @fam = $i->famc;
my @fam = $i->fams;

Returns a list of families that $i belongs to. πŸ‘‘

  • famc() returns those families in which $i is a child. 🧸
  • fams() returns those families in which $i is a spouse. πŸ’

two letters apart, two completely different life stages, iykyk. ✨


and that's the whole page, bestie πŸ’– this gem is perl v5.36.0, dated 2022-10-16, and it came to you from the User Contributed Perl Documentation crew β€” go forth and normalise some spaces πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from