Supports Perl 5 modules including XS modules. Allows passing integers, strings, arrays, hashes, code references, file handles and objects between Perl

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-10-19 09:30:02

Supports Perl 5 modules including XS modules. Allows passing integers, strings, arrays, hashes, code references, file handles and objects between Perl 5 and Raku. Also supports calling methods on Perl 5 objects from Raku and calling methods on Raku objects from Perl 5 and subclass Perl 5 classes in Raku.

Note that installing Inline::Perl5 requires the Perl 5 library to be installed. See the BUILDING section for more information.

Raku's use statement allows you to load modules from other languages as well. Inline::Perl5 registers as a handler for the Perl5 language. Rakudo will automatically load Inline::Perl5 as long as it is installed:

Inline::Perl5's call($name, *@args) method allows calling arbitrary Perl 5 functions. Use a fully qualified name (like "Test::More::ok") if the function is not in the "main" namespace.

Please note that since Raku does not have the same concept of "context", Perl 5 functions are by default called in list context. See "Invoking a method in scalar context" for how to get around that.

Leave a Comment