> use Data::Printer:from<Perl5>
Unsupported type NativeCall::Types::Pointer<94859011731840> in p5_to_p6
in method p5_to_p6_type at /usr/lib/perl6/site/sources/130449F27E85303EEC9A19017246A5ED249F99E4 (Inline::Perl5) line 298
in method unpack_return_values at /usr/lib/perl6/site/sources/130449F27E85303EEC9A19017246A5ED249F99E4 (Inline::Perl5) line 375
in method invoke at /usr/lib/perl6/site/sources/130449F27E85303EEC9A19017246A5ED249F99E4 (Inline::Perl5) line 446
in method import at /usr/lib/perl6/site/sources/130449F27E85303EEC9A19017246A5ED249F99E4 (Inline::Perl5) line 776
in sub EXPORT at /usr/lib/perl6/site/sources/130449F27E85303EEC9A19017246A5ED249F99E4 (Inline::Perl5) line 805
in any statement_control at /usr/lib/nqp/lib/Perl6/Grammar.moarvm line 1

I have no idea how I can usefully load this library into a Perl6 script.

Shouldn't you just use use Data::Printer:from<Perl5>? You should not have to set the include path with use lib:from<Perl5> '/usr/local/share/perl/5.26.0/Data/', and you are missing the use Data::Printer:from<Perl5> statement, see the GitHub page for Inline::Perl5 for examples.
– Håkon HæglandFeb 5 at 21:36

@HåkonHægland I've edited the question to show the error that that gives
– conFeb 5 at 21:38

@HåkonHægland the solution on there isn't acceptable. Elizabeth may be correct that this a bug deep within either the language or the module, but another user suggested that there may be a better fix
– conFeb 5 at 21:51

2

Hi again @con. Håkon has now added a very simple 4 line recipe to refresh your IP5. If you already have git installed you will likely find that you can just type those 4 lines and when they've done their thing you'll be all set. If you don't have git installed then you'd need to do that first. Please let us know if you decide to try. If you do, then in principle (modulo bugs like the one you found) you should be able install P5 modules and then write the use ... :from<Perl5> line and then write P6 code to use the P5 functions. So this could be a big improvement in P6's utility for you.
– raiphFeb 6 at 10:26

That demonstrates it works, which is great, and it looks simple to use. And you've also provided instructions on how you got it to work using a from-scratch approach, which is also great, but looks complicated. I'm guessing a subset of those instructions would probably work. For example, it seems likely @con already has a PIC P5 in place. (Wouldn't IP5 have complained about that before the Unsupported type NativeCall::Types::Pointer error if they didn't?) Others may read this answer in future. I imagine any effort to provide a simpler thing to try initially will make the world a better place.
– raiphFeb 5 at 23:49

1

Thanks for the comments @raiph! I think you are right there are simpler ways to do this. I thought it might be helpful to include instructions on using perlbrew to install a position independent perl, but maybe that is confusing. I included the simpler approach if you already have the position independent perl in my answer.
– Håkon HæglandFeb 6 at 5:48

2

this is amazing work @HåkonHægland the only minus is that the color doesn't come through, but that is very minor. Much appreciation and thanks!
– conFeb 6 at 16:32

1

\o/ Does the color work when you write a P5 script using the exact same module and running the script via perl (so not involving P6 at all)? If it does not work in pure P5 then I'd love to help with that. If it does in P5 but not via P6 I'd love to help with that too. If latter case then please consider posting an SO with just the perl6 tag w/ a minimal P5 script that shows color on your screen (no need in SO) and output of print $PERL_VERSION;. Also, equivalent P6 script that does not work and output of .say for $*DISTRO, $*VM, $*PERL.compiler.version, %*ENV;. TIA.
– raiphFeb 8 at 21:47