I have the following test:
use Test::More; use Lingua::EN::NameCase 'nc'; use utf8; my $output = Test::Builder->new->todo_output; binmode $output, ':encoding(UTF-8)'; $output = Test::Builder->new->failure_output; binmode $output, ':encoding(UTF-8)'; my $name = 'Lintão'; is nc($name), $name, 'nc() should not change a properly namecased name'; diag nc($name); done_testing;
On Mac OS X with Perl 5.10.1, I get the following output:
nc.t .. ok 1 - nc() should not change a properly namecased name 1..1
Unfortunately, the same test on Debian Squeezebox with 5.10.1 Perl produces this output:
nc.t .. not ok 1 - nc() should not change a properly namecased name
The insult line in the nc() routine is as follows:
s{ \b (\w) }{\u$1}gox ;
So, anyway, the same version of Perl on Debian is misusing the word boundary. Can someone help me debug further?
source share