colicab has asked for the wisdom of the Perl Monks concerning the following question:
I have a fairly basic question. I hope this is the right place for it.
I have a 4 column table: the first column is the inhouse ID of an individidual, the second is the family ID, the 3rd is an external ID and the last column give me some additional information about that person.
I'm looking for a way (an existing module, object type...) to access any column I want given any ID I give in. For example, I have the inhouse person ID, and I want the family ID (for simplicity suppose all these IDs occur only one in the entire table). For the moment I tackled this issue by making a complex hash structure, bit it looks a bit convoluted and I'm looking for a more elegant, less error-prone way to code this. I was imagining an object type where you have methods like ''inhouse2family" so I can get what I want by typing:
my $family_ID = $object->inhouse2family(<inhouse ID comes here>)I was just attempting to make an object (it would have been my first object I write) that does something like this, but it felt like a 'basic' feature that maybe someone else already found an elegant solution for. Does anyone know one?
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Looking for an existing package to crosslink different IDs with each other
by GrandFather (Saint) on Oct 01, 2012 at 00:24 UTC | |
|
Re: Looking for an existing package to crosslink different IDs with each other
by kcott (Archbishop) on Oct 01, 2012 at 00:12 UTC | |
by colicab (Initiate) on Oct 01, 2012 at 14:13 UTC | |
by choroba (Cardinal) on Oct 01, 2012 at 16:38 UTC | |
by kcott (Archbishop) on Oct 01, 2012 at 23:03 UTC |