Cannot import Perl5 module using Inline::Perl5 into Perl6

前端 未结 2 1131
梦如初夏
梦如初夏 2021-01-18 11:39

I\'m trying to import a Perl5 module I really like https://metacpan.org/pod/Data::Printer using advice from the manual page https://modules.perl6.org/dist/Inline::Perl5:cpan

2条回答
  •  误落风尘
    2021-01-18 12:15

    I think you stumbled on a bug in Inline::Perl5 that seems to happen for the Data::Printer Perl 5 module, so I would suggest you open an issue for it at https://github.com/niner/Inline-Perl5/issues .

    Meanwhile, the syntax has become much simpler. Once you have Inline::Perl5 installed, you only need to add the :from adverb to load a module from Perl 5:

    use Data::Printer:from;
    

    Unfortunately, at this moment that creates the same error that you already described:

    ===SORRY!===
    Unsupported type NativeCall::Types::Pointer<140393737675456> in p5_to_p6
    

    So I don't think there is a solution this that wouldn't require an upgrade of either Inline::Perl5 or Rakudo Perl 6.

提交回复
热议问题