Re: a new script category: Scientific

[email protected] (David Wheeler) Tue, 27 May 2003 13:35:21 -0700
Newsgroups perl.scripts
Message-ID <[email protected]>
On Tuesday, May 27, 2003, at 01:25  PM, William R Ward wrote:

> Even within the Amero-centric paradigm there are still some scenarios
> your module may not handle (correct me if I'm wrong):
>
>  * Two or more middle names (e.g. George Herbert Walker Bush, British
>    nobility/royalty, etc.)

The second middle name can be handled as an extra argument, and added 
to the format (or not) using %1.

>  * No middle name

If there is no middle name (it's undef or ''), then even if the format 
has %m in it, it will not be displayed. This is the whole point of the 
module, really -- to handle those situations where the available names 
vary a great deal.

>  * Only a middle initial (e.g. Harry S. Truman, Bullwinkle J. Moose)

It will be included as an initial when using %m for middle name, the 
middle initial with the period using %M, and the middle initial itself 
using %I. The only caveat is that if you use %M with a name like 
"Ulysses S Grant" (note the lack of a period), the middle initial will 
be output as "S.". This is a rare case, however.

>  * First initial, goes by middle name (e.g. my mom, D. Colleen Ward)

Make the first name argument "D.", the middle name argument "Colleen", 
and the last name argument "Ward".

>  * Last name is two words (e.g. a friend of mine, Joydeep Roy
>    Chowdhury; his last name is "Roy Chowdhury")

It's still a single scalar argument, "Roy Chowdhury", to strfname(). Of 
course, the initial using %L would be "R.".

The upshot is that you pass in the various name parts you want 
formatted into a string. Lingua::Strfname doesn't parse string into 
name parts. For that, someone would have to write Lingua::Strpname. ;-) 
And that would more likely have to be localized, e.g., 
Lingua::EN::Strpname.

Regards,

david

-- 
David Wheeler                                     AIM: dwTheory
[email protected]                              ICQ: 15726394
http://kineticode.com/                         Yahoo!: dew7e
                                                Jabber: [email protected]
Kineticode. Setting knowledge in motion.[sm]