Thursday, October 8, 2015

Perl6 and CPAN

In the Perl5 world, just in case anyone is unaware, CPAN is a major factor. Its basically the hub of the Perl5 world.

What I am referring to here as CPAN is not just the mirrored collection of 32K+ distributions. Its the ecosystem that's built up around that collection. This ecosystem has many parts, some more important than others depending on who you talk to, but the most important parts to me are:

  • the mirrored distribution collection - all the Perl5 modules in one place
  • pause (pause.perl.org) - module upload and mgmt services
  • metacpan (metacpan.org) - online search, docs, and other services
  • cpan testers (http://cpantesters.org/) - CPAN smoking
  • module installers - Perl5 has cpanm and others - Perl6 has panda and others

These are the 5 aspects of "CPAN" that I'd like to see happen for Perl6. One way to get that would be to write the whole thing from scratch in Perl6. While it may sound cool in some sort of dogfoody and/or bootstrappy kind of way to some, it sounds like a lot of work to me and we're a bit strapped for developer resources. Another way would be to add support for Perl6 to the existing CPAN bits. The hope there being, primarily, that it'd be a lot less work. The latter approach is what I've been working on lately. And if we want to refactor ourselves off the Perl5 bits in the future we can take our time doing it; later.

At this time we have:
  • basic pause support
  • a metacpan prototype

So we can publish Perl6 distributions to CPAN and search that collection. Well, sort of on that last bit. The metacpan prototype instance is not currently tracking CPAN. Its actually been loaded up with Perl6 distributions from the Perl6 module ecosystem (modules.perl6.org) for testing. But hopefully soon we'll have an official Perl6 metacpan instance, separate from the Perl5 instance, that will track CPAN's Perl6 content as it should.

What we need next is:
  • completion of basic metacpan Perl6 support
  • at least one Perl6 module installer to support CPAN (probably panda)
  • Perl6 integration with cpan testers

If anyone is interested in working on any of this stuff please stop by #perl6 on freenode. If nobody else is able to help you I'll (jdv79) do my best.

3 comments:

  1. To clarify the contact info: it's the #perl6 channel on the irc.freenode.net IRC server: irc://irc.freenode.net/perl6

    ReplyDelete
  2. To clarify the contact info: it's the #perl6 channel on the irc.freenode.net IRC server: irc://irc.freenode.net/perl6

    ReplyDelete
  3. Given that much of Perl 5's success can be attributed to CPAN, it seems curious that some Perl 6 analogue hasn't had much thought / work.

    I think it's a shame to shoehorn Perl 6 into the current CPAN ecosystem. It would be an opportunity to learn from some of the CPAN's mistakes (which to be fair have only be learned over time), and start with a clean and separate service. For example: the permissions model; handling versions, and version constraints on dependencies; and CPAN vs BackPAN.

    Plus CPAN was created well before the era of git(hub) & friends, Travis-CI, and other services. Interesting to think what a modern CPAN, without the constraints of back compat, might look like.

    ReplyDelete