I have a lot of code in perl5 and I am looking for an option to translate this code to javascript/typescript and/or raku/perl6, i.e., I'm looking for
- perl5 to javascript
- perl5 to perl6
- perl6 to javascript
I'd like to end up with readable code, that doesn't have to be executable. It's not to translate code in bulk, but it's to take some good code that I've written in perl (say 300-600 lines at a time) and translating it to readable perl6 and javascript.
For perl5 to Javascript https://github.com/grassedge/perl2js is probably closest, but it misses some fairly simple things, and also writes replacement functions in js, rather than translating constructs as best as possible.
perlito5/6 seems to be focused on creating executable code, which is very complex to edit.
I've seen talk about a perl5 to raku/perl6 transpiler, but haven't actually found it.
There's also https://metacpan.org/pod/PPI which might be a good start to transpile perl5 into other languages?
Any thoughts?