# Copyright (c) 2008 bivio Software, Inc. All Rights Reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: DisplayName.bunit,v 1.4 2008/02/06 17:17:57 moeller Exp $ Type(); [ { method => 'parse_to_names', compute_return => sub { my($case, $actual) = @_; my($a) = $actual->[0]; return ref($a) ne 'HASH' ? [$a->get_name] : [@$a{qw(first_name middle_name last_name)}]; }, } => [ 'Dr. John' => ['Dr.', '', 'John'], 'Hot, Dog' => ['Dog', '', 'Hot'], 'Mary J. Keene, M.D.' => ['Mary', 'J.', 'Keene, M.D.'], 'Mary Krueger, R.N.' => ['Mary', '', 'Krueger, R.N.'], 'Rob de la Roche' => ['Rob', '', 'de la Roche'], 'Ludwig von Beethoven' => ['Ludwig', '', 'von Beethoven'], 'Rev. H. Gross' => ['Rev. H.', '', 'Gross'], 'Drew A. Barrymore' => ['Drew', 'A.', 'Barrymore'], 'King James III' => ['King', '', 'James, III'], 'Joe Gross, JD' => ['Joe', '', 'Gross, JD'], 'Mrs. Fiona A. Brydy' => ['Mrs. Fiona', 'A.', 'Brydy'], 'Dr. A. Carter MD' => ['Dr. A.', '', 'Carter, MD'], 'Dr. Richards' => ['Dr.', '', 'Richards'], 'Miss Missy M. Mistletoe, M.S.' => ['Miss Missy', 'M.', 'Mistletoe, M.S.'], 'Joe' => ['', '', 'Joe'], 'Jones Sr' => ['', '', 'Jones, Sr'], 'A.B. Gross' => ['A.', 'B.', 'Gross'], 'IM ALL CAPS' => ['IM', 'ALL', 'CAPS'], 'Mr.Eric R. Du Puis' => ['Mr. Eric', 'R.', 'Du Puis'], 'Juan Chuy de Marcos' => ['Juan', 'Chuy', 'de Marcos'], 'Maggie de la Rosa' => ['Maggie', '', 'de la Rosa'], '' => 'UNSPECIFIED', ' ' => 'UNSPECIFIED', ',' => 'NULL', 'MyVeryLongNameShouldBlowTheLengthLimit a b' => 'FIRST_NAME_LENGTH', 'a MyVeryLongNameShouldBlowTheLengthLimit b' => 'MIDDLE_NAME_LENGTH', 'a b MyVeryLongNameShouldBlowTheLengthLimit' => 'LAST_NAME_LENGTH', 'Dr. ANGELICA M DE ANTONIO PHD' => ['Dr. ANGELICA', 'M', 'DE ANTONIO, PHD'], 'B JOSEPH GRONER, III' => ['B', 'JOSEPH', 'GRONER, III'], 'H R STEWART JR' => ['H', 'R', 'STEWART, JR'], 'DONALD E EASTLAKE 3RD' => ['DONALD', 'E', 'EASTLAKE, 3RD'], 'MICHAEL J BIO PE' => ['MICHAEL', 'J', 'BIO, PE'], 'MICHAEL J BIO, PE' => ['MICHAEL', 'J', 'BIO, PE'], 'Lana Fisher, MA, LICSW' => ['Lana', '', 'Fisher, MA, LICSW'], 'Judy and Larry' => ['Judy and Larry', '', ''], 'Bob And' => ['Bob', '', 'And'], 'Ole Moeller III, MD' => ['Ole', '', 'Moeller, III, MD'], ], ];