Hi Mark,
On Wed, Jul 8, 2009 at 11:53 PM, Mark Summerfield via
RT<bug-Lingua-EN-NameCase@rt.cpan.org> wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=47708 >
>
> On 2009-07-08, Dave Gray via RT wrote:
>> Wed Jul 08 12:33:01 2009: Request 47708 was acted upon.
>> Transaction: Ticket created by yargevad
>> Queue: Lingua-EN-NameCase
>> Subject: Suffix that should be uppercased (MD) is titlecased (Md)
>> Broken in: 1.11, 1.12, 1.13, 1.14, 1.15
>> Severity: Normal
>> Owner: Nobody
>> Requestors: bitcard@doesntsuck.com
>> Status: new
>> Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=47708 >
>>
>>
>> Names with suffixes, such as the doctory suffix 'MD' do not appear to be
>> handled at all. This patch uppercases 'MD' against 1.15
>
> The patch looks wrong to me.
>
> Instead of
> s{ \b (Md) $ }{\U$1}ox;
> should't it be
> s{ \b ([Mm][Dd]) $ }{\U$1}ox;
That happens after the initial title-casing, and plain old 'Md' worked
in my testing. The two should be equivalent, though.
Show quoted text> And if you're doing suffixes, why not do these instead:
>
> s{ \b ([Mm][DdAa] $}{\U$1}ox; # MD, MA
> s{ \b ([Pp][Hh][Dd] $}{PhD}ox; # PhD
That's a good idea, I would probably have ended up submitting a patch
like that in the future anyway!
Cheers,
Dave