Inline::Perl5 无法使用 Lingua::En::Titlecase Perl 模块

Inline::Perl5 not working with Lingua::En::Titlecase Perl module

知道了:

use Lingua::En::Titlecase:from<Perl5>;

# this line is straight from doc
my $tc = Lingua::EN::Titlecase.new("CAN YOU FIX A TITLE?");

得到这个:

Could not find symbol ''&Titlecase'' in ''GLOBAL::Lingua::EN''

我记得,Inline::Perl5 大约一个月前我踢它的轮胎时对我有用。不知道我做错了什么。 Docs 没有为我阐明任何事情

Could not find symbol ''&Titlecase'' in ''GLOBAL::Lingua::EN''

错误的原因是您将 Inline::Perl5 与不存在的 perl 模块 Lingua::En::Titlecase 一起使用。您需要在“EN”中使用大写的“N”:

use Lingua::EN::Titlecase:from<Perl5>;
my $tc = Lingua::EN::Titlecase.new("CAN YOU FIX A TITLE?");
say $tc;

输出:

Can You Fix a Title?