Gedcom.pm icon indicating copy to clipboard operation
Gedcom.pm copied to clipboard

get_individual

Open nigelhorne opened this issue 5 years ago • 4 comments

The documentation says:

   get_individual
         my $me = $ged->get_individual("Paul Johnson");

       Return a list of all individuals matching the specified name.

However:

1: The sample code is assigning a scalar not a list; 2: If I search a name which I know matches more than one person, I only get one returned value even in a list context.

nigelhorne avatar Sep 30 '20 15:09 nigelhorne

A couple of lines later in the docs:

In scalar context return the first match found.

I agree that the docs could be more clear here, but something like

  my @indis = $ged->get_individual("Queen Elizabeth");

should be returning all the matches found according to matching methods in the docs. If this is not the case could you please provide a code snippet and gedcom file to reproduce the problem?

Thanks for the report!

pjcj avatar Sep 30 '20 22:09 pjcj

The code snippet is around line 1011 of https://github.com/nigelhorne/gedcom.

The gedcom file is very large and I don't wish to upload to github as it contains personal information. Can I put it on dropbox?

nigelhorne avatar Sep 30 '20 22:09 nigelhorne

Yes, please.

pjcj avatar Oct 08 '20 09:10 pjcj

Did you manage to get this all worked out, or is there still a problem to be looked into?

pjcj avatar Jul 21 '24 16:07 pjcj