p5_to_p6 中不支持的类型 NativeCall::Types::Pointer
这是一个错误Inline::Perl
4 天前已修复 https://github.com/niner/Inline-Perl5/commit/c5cf4dce6bf9d4deec1da10d49602ae2524ed746.
如果您简单地这样做,您将不会获得这个最新版本zef install Inline::Perl5
。
这是我所做的:
# Install a position independent version of perl,
# see https://github.com/niner/Inline-Perl5/
$ perlbrew install perl-5.29.7 --as perl-5.29.7-PIC -Duseshrplib -Dusemultiplicity
$ perlbrew install-cpanm
$ perlbrew use perl-5.29.7-PIC
$ cpanm Data::Printer
$ git clone https://github.com/niner/Inline-Perl5.git
$ cd Inline-Perl5/
# Run: 'zef uninstall Inline::Perl5' first if you already have it installed
$ perl6 configure.pl6
$ make
$ make install # this installs the latest version of Inline::Perl5
$ cd ..
然后我用这个脚本测试了这个(p.p6):
use Data::Printer:from<Perl5>;
my @a = 1,2,3,4;
p @a;
Running perl6 p.p6
现在给出:
[
[0] 1,
[1] 2,
[2] 3,
[3] 4
]
Edit:如果您已经安装了位置无关的perl
二进制,上面的安装过程可以简化:
$ git clone https://github.com/niner/Inline-Perl5.git
$ cd Inline-Perl5/
$ zef uninstall Inline::Perl5
$ zef install . # or alternatively create the `Makefile` as above