Is it possible to use Smart::Comments:from<Perl5> in a raku program?
Asked Answered
D

0

6
#!/usr/bin/env raku

use Inline::Perl5;
use Smart::Comments:from<Perl5>;

my $foo = 42;

### $foo

say "Done";

Expected output:

### $foo: 42
Done

Actual output:

Done
zsh: segmentation fault  raku sc-test.raku

Is the problem that Smart::Comments relies on Perl5 source filtering?

Decrepitude answered 10/3, 2023 at 22:57 Comment(3)
Smart::Comments uses Filter::Simple. Inline::Perl5 specifically references Filter::Simple. Nothing in Raku should ever segfault, I'd suggest reporting a bug to Inline::Perl5. It would also be an interesting project to extract the functions from inside Smart::Comments and use them like normal code.Xray
Hi @Jim. It's very plausible niner, IP5's author, is unaware of your post here on SO. If you would be willing to patiently wait for a comment by them, which might not come for a long time given how busy they are (including with RakuAST), and then respond to any comments they make if they do comment, then filing an issue as suggested would itself be a contribution to Raku and IP5. (If you've just moved on then fair enough but I just wanted to encourage you to file an issue if you'd follow up if niner follows up.)Mcelrath
Thanks for the encouragement. Inline::Perl5 now has another issue to ponder.Decrepitude

© 2022 - 2024 — McMap. All rights reserved.