【问题标题】:Error when invoking "new" method of Unicode::Collate::Locale Perl module on Cygwin在 Cygwin 上调用 Unicode::Collat​​e::Locale Perl 模块的“新”方法时出错
【发布时间】:2012-08-09 10:27:23
【问题描述】:

我在 Cygwin 上使用 Perl 5.14.2 和 Unicode::Collate::Locale 对一些法语文本进行排序

use Unicode::Collate::Locale;
my $coll = Unicode::Collate::Locale->new(locale => "fr");
@french_text = $coll->sort(@french_text);

我得到的错误是:

Unicode/Collate/Locale/fr.pl can't be found at ./program.pl line 16

此错误消息是从以下文件生成的:

/usr/lib/perl5/5.14/i686-cygwin-threads-64int/Unicode/Collate/Locale.pm

存在以下文件:

/usr/lib/perl5/5.14/Unicode/Collate/Locale/fr.pl

但经过调查,我注意到 Locale.pm 正在寻找:

/usr/lib/perl5/5.14/i686-cygwin-threads-64int/Unicode/Collate/Locale/fr.pl

此文件不存在,因此我收到错误消息。其他人看到这个问题吗?这是一个错误吗?

【问题讨论】:

    标签: perl cygwin


    【解决方案1】:

    你应该检查Unicode::Collate::Locale是否安装正确-

    使用命令instmodsh检查已安装的模块。

    MPBAB:work macpro$ instmodsh
    Available commands are:
       l            - List all installed modules
       m <module>   - Select a module
       q            - Quit the program
    cmd? m Unicode::Collate::Locale
    Available commands are:
       f [all|prog|doc]   - List installed files of a given type
       d [all|prog|doc]   - List the directories used by a module
       v                  - Validate the .packlist - check for missing files
       t <tarfile>        - Create a tar archive of the module
       h                  - Display module help
       q                  - Quit the module
    WWW::Mechanize cmd? f
    

    【讨论】:

    • U::C::Locale 是 v5.14 的一部分。实际上,我以前不止一次地看到过这个问题,但还没有找到它。这也不仅仅是 Cygwin 的问题,因为那不是我见过的地方。我似乎记得它是通过 CPAN 安装/更新/刷新修复的。
    • 我按照建议重新安装了模块,问题已解决。感谢您的帮助。
    猜你喜欢
    • 2013-02-27
    • 1970-01-01
    • 2011-03-29
    • 1970-01-01
    • 2017-06-08
    • 2018-12-09
    • 2020-08-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多