Friday, October 9, 2015

Perl6 and CPAN: MetaCPAN Status as of 2015-10-09

MetaCPAN, like the rest of "CPAN", was built assuming the sole context of Perl5. Which is cool until we want to use it for Perl6 and avoid the troubles associated with different namespaces, dist mgmt, etc... To largely avoid and more easily handle these issues for MetaCPAN it's been suggested that we have separate instances. The existing Perl5 instance only needs to be changed to ignore Perl6 distributions. There has already been some breakage because it didn't ignore a Perl6 dist of mine which exists in the Perl5 world:( And the new Perl6 instance will do just the opposite and only look at Perl6 distributions.

In contrast, and relatedly, on CPAN we've designated a special spot for Perl6 distributions in order to keep them separate from the Perl5 dists. This reserved place is a Perl6 subdir in an author's dir (/author/id/*/*/*/Perl6/). Any dists in or under that spot on the fs will be considered a Perl6 dist; valid or invalid. So this is where the Perl6 MetaCPAN will look and the Perl5 instance will not.

Current development is being done on these temporary branches:


And the main dev instance is running on The web end is at and the api is at

So far the idea has been to iterate on the aforementioned branches and instance until we have something that works sufficiently well. At that point we'll tidy up the branches and submit them for merging. Shortly after that time the hope is that we'll be able to stand up the official Perl6 instance.

The list of requirements for being adequately cooked is:

  1. track Perl6 CPAN dists and ignore Perl5 dists
  2. import a Perl6 distribution
  3. index a Perl6 distribution for search
  4. render pod6 documentation
  5. do Perl6 syntax highlighting

All of these have been hacked in and are at various degrees of completeness. Next up is testing and fixing bugs until nothing major is left. To that end I've recently loaded up the dev instance with all the distributions from The dist files were generated, very hackily, with I also just loaded them all under one user, mine, for simplicity. That load looks like it has problems of its own as well as revealing a bunch of issues. So in the coming days I hope to get that all sorted out.

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 ( - module upload and mgmt services
  • metacpan ( - online search, docs, and other services
  • cpan testers ( - 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 ( 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.

Thursday, May 14, 2009

Test::Able v0.07

The last time I posted about Test::Able it was about the 0.05 release.
Version 0.07 just made it out the door. Some of the more interesting changes since 0.05 are:

  • more documentation

  • added exception handling

  • added Test::Able::Role

Of course the changelog has more.

I'll just say a few things about the exception handling.

The design goal was to try to capture the few broad, and common, usage patterns while still having the ability to be more specific when desired.

The Broad

So there are three exception handling modes. The default of which is to die as usual. The other two offer a way to silently ignore yet record exceptions. And one of them affords a more sane way to cleanup after a disaster.

The Specific

Since all exceptions are stored when silently ignoring them anything can observe and react to them. Also, Test::Able::FatalException, as the name might hint at, provides a way to really die when all other exceptions would be rendered non-fatal.

This is all documented in Test::Able::Role::Meta::Class under on_method_exception and method_exceptions. It might help to look at the exception tests as well.