Posted on 2008-11-06 14:05:07-08 by chris72601
Possible problem with sentence case.
Hello all, This is using (DCONWAY/Text-Autoformat-1.13.tar.gz) from cpan. What am I missing, or is this a bug? Seems straight forward...
sub scase($$) { my ($c,$string)=@_; $c->log->info("scase in=$string"); $string= autoformat( lc($string), { case => 'sentence', all=>1, renumber=>0 , right=>length($str +ing)}); $c->log->info("scase out=$string"); return $string; }

[info] scase in=Under administrative direction, setting up own standard of performance. Virtually self-supervising. Reports to SENIOR MANAGEMENT of the organization.
[info] scase out=Under administrative direction, setting up own standard of performance. virtually self-supervising. reports to senior management of the organization.

I would expect:
Under administrative direction, Setting up own standard of performance. Virtually self-supervising. Reports to senior management of the organization.

Thanks, Chris
Direct Responses: 9239 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.