HN2new | past | comments | ask | show | jobs | submitlogin

> Can one even use CPAN with Perl6?

Yes.

At a Perl conference in October last year Stefan Seifert decided it was time for him to have a go at something Perl 6 related. He had never written Perl 6 code before, let alone participated in the project, but within 24 hours he had Perl 6 calling Perl 5 calling Python[1].

That was just a few months ago. Now the Inline::Perl5 module[2] allows folk to use Perl 5 modules, even ones that do C level guts poking in to the Perl 5 interpreter, and to pass data back and forth, do callbacks back and forth, handle exceptions raised by Perl 5 in Perl 6 and vice-versa, use Perl 6 to call methods on Perl 5 objects and vice-versa, and use Perl 6 to subclass Perl 5 classes. Thus he's been able to, for example, create apps in Perl 6 using a leading Perl 5 web framework called Catalyst.[3] He's also having fun with calling Python libs from Perl 6.[4]

There's a lot more going on related to interop between Perl 6 and Perl 5, and more generally between Perl 6 and other languages, but the above is obviously a biggie.

> Is it even possible to convert existing Perl5 CPAN packages to support both versions at the same time

As is hopefully clear, with Inline::Perl5 there's no need to convert.

(Some folk will still want to rewrite some Perl 5 code in to Perl 6, and there are fledgling tools to assist, but they aren't necessary, just a nice option to have.)

[1] https://www.youtube.com/watch?v=m_Y-lvQP6jI&list=UU7PuZDAIVM...

[2] https://github.com/niner/Inline-Perl5

[3] http://www.reddit.com/r/perl6/comments/2k6ii8/nines_apw_talk...

[4] http://www.reddit.com/r/perl6/comments/2n27el/perl6_20141121...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: