【发布时间】:2018-09-12 18:13:23
【问题描述】:
我去
export PERL6LIB="/GitHub/perl6-Units/lib"
然后
echo $PERL6LIB
/GitHub/perl6-Units/lib
但是当我运行perl6 t/01-basic.t
use v6;
use Test;
plan 3;
lives-ok {
use Units <m>;
ok @Units::UNITS.elems > 0;
ok (0m).defined;
}
done-testing;
我仍然收到错误
===SORRY!===
Could not find Units at line 8 in:
/Users/--me--/.perl6
/usr/local/Cellar/rakudo-star/2018.01/share/perl6/site
/usr/local/Cellar/rakudo-star/2018.01/share/perl6/vendor
/usr/local/Cellar/rakudo-star/2018.01/share/perl6
CompUnit::Repository::AbsolutePath<140707489084448>
CompUnit::Repository::NQP<140707463117264>
CompUnit::Repository::Perl5<140707463117304>
在 Perl 5 中,我会使用 print "@INC"; 来查看在引发错误之前为 lib 搜索了哪些路径。使用say flat $*REPO.repo-chain.map(*.loaded); 要么是在它加载之前,要么是在它引发异常之后。
任何帮助将不胜感激 - 或者可能是关于在 ~/.perl6 中输入什么的提示,因为我也无法获得符号链接。
【问题讨论】:
-
旁注:作为 PERL6LIB 的替代品,您也可以
use lib 'lib/dir'; -
啊是的 - 谢谢@donaldh - 我一直依赖于编辑源代码中的所有 use lib 行......因此需要 -I
标签: raku