Groups | Search | Server Info | Login | Register
| Newsgroups | perl.gedcom |
|---|---|
| Subject | Re: Need help using Gedcom.pm |
| References | <D4F5EA07-02E2-4A96-B0A5-6FFF994DE941@witch.westfalen.de> |
| Message-ID | <7bc3cb77-197d-e085-77d4-95ad04c0b2ff@bandsman.co.uk> (permalink) |
| Date | 2017-05-05 07:47 -0400 |
| From | njh@bandsman.co.uk (Nigel Horne) |
On 5/4/17 11:32 PM, Jutta Wrage wrote:
> Hi!
>
> I hope this it the right place to get some help using the module.
>
> I have written a little perl program to extract all persons from an exported Gedcom file to a tab delimited list. That works well so far.
>
> My problem now is how to get out the marriage names for persons who are marriaged.
> Is it possible to extract them from the gedcom file using gedcom.pm?
This snippet is from Gedcom::Individual::as_string in gedcal and
ged2site. I hope it helps to give you an idea on how to do it.
my $surname;
my $sex = get_value({ person => $self, value => 'sex' });
if(defined($sex) && ($sex eq 'F')) {
if(my $husband = $self->husband()) {
$surname = $husband->surname();
$has_maiden_name = 1;
} elsif(my $spouse = $self->spouse()) {
if($opts{'f'}) {
die 'married, but no husband relationship';
}
if($opts{'w'}) {
red_warning({ person => $self, warning => 'married,
but no husband relationship' });
}
$surname = $spouse->surname();
$has_maiden_name = 1;
}
}
>
> Jutta
>
Regards,
-Nigel
--
Nigel Horne
Conductor: Rockville Brass Band, Washington Metropolitan GSO
@nigelhorne | fb/nigel.horne | bandsman.co.uk | concert-bands.co.uk | www.nigelhorne.com
Unless it's for my eyes only, please use "reply all"
Back to perl.gedcom | Previous | Next — Previous in thread | Next in thread | Find similar
Need help using Gedcom.pm jw@witch.westfalen.de (Jutta Wrage) - 2017-05-05 05:32 +0200
Re: Need help using Gedcom.pm njh@bandsman.co.uk (Nigel Horne) - 2017-05-05 07:47 -0400
Re: Need help using Gedcom.pm jw@witch.westfalen.de (Jutta Wrage) - 2017-05-05 16:57 +0200
Re: Need help using Gedcom.pm ron@savage.net.au (Ron Savage) - 2017-05-07 10:56 +1000
Re: Need help using Gedcom.pm jw@witch.westfalen.de (Jutta Wrage) - 2017-06-08 21:55 +0200
Re: Need help using Gedcom.pm ron@savage.net.au (Ron Savage) - 2017-06-12 17:51 +1000
solved: Family names for marriages only, was: Need help using Gedcom.pm jw@witch.westfalen.de (Jutta Wrage) - 2017-06-12 15:37 +0200
Re: solved: Family names for marriages only, was: Need help using Gedcom.pm ron@savage.net.au (Ron Savage) - 2017-06-13 08:54 +1000
csiph-web