Tatsuhiko Miyagawa's Blog

Perl QA Hackathon 2015 Day 2

April 18, 2015

Plack

While Plack has very little to do with the QA/toolchain stuff (more on that later), I shipped Plack-1.0035-TRIAL to CPAN. This includes a lot of optimizations around header parsing, header generation and PSGI header array manipulations. If you have a web application running with Plack, you should definitely test your application with this version by running cpanm — dev Plack.

provides & indexes

Day 1 post of mine has spurred a bit of discussion on irc as “what do you mean by rejecting uploads without META!?”. And that eventually has evolved into a quick face to face chat about the meaning of provides in the META v2, where ribasushi wanted to use provides to display “private” module documentation on MetaCPAN. He has uploaded Acme::WeirdPod on CPAN to demonstrate the (broken) behavior of MetaCPAN.

CPAN::Common::Index

Continuing the work on yesterday on MetaCPAN backend for CPAN::Common::Index, I bugged oalders and clintongormley about the complexity in my code, and we just agreed that it would be better if MetaCPAN just implemented what I need as a new API endpoint, and use it in cpanm (and possibly other clients via CPAN::Common::Index).

clintongormley already has started a branch implementing the endpoint I need. I uploaded VersionBump test distribution to analyze and test the behavior of PAUSE and MetaCPAN when a sub package has a decreasing, staying or increasing version numbers.

Because MetaCPAN is currently expecting a massive infrastructure update in coming weeks including ElasticSearch upgrades, we don’t expect to see this server side API available while we’re in Berlin. Right now I have vendored the ported version in cpanm and will continue using that, and switch to the server-side optimized one once it’s available.

pausetm — PAUSE Time Machine

I blogged about this 2 years ago, but PAUSE has a git history of its 02packages list. I made and uploaded App::PAUSE::TimeMachine distribution and pausetm command that works as a frontend for this git repository.

> pausetm cat 2014-09-01  
(shows 02packages file as of Sep 1st, 2014
> pausetm server  
(use <http://localhost:5000/2015-01-01> as a CPAN mirror)

pausetm server will actually run an httpd (via Plack) that serves modules/02packages.details.txt.gz for a given date in the path. It also redirects authors/id/* to its equivalent in backpan, so you can use the URL as a CPAN mirror, as in cpanm -M http://localhost:5000/2014-01-01. By the way I really like how I implemented the command line and web server in the same module. It is very simple, and you can use the command line to boot a web server using Plack::Runner, but also grab a PSGI code reference via a module API, in case you want to mount the app in your web application or apply some middleware to it. I hope this should be the normal way to implement a web server script on CPAN.FatPackerI wrote a test for mat’s patch yesterday to eliminate virtual entry in %INC and it was merged and shipped to CPAN.

cpanm

I shipped the new stable release for 1.7x to address the issue of HTTPS certificate warnings with curl -L cpanmin.us. Because it involves two HTTPS hosts, Cloudflare and GitHub as of today, there’s a big chance of seeing certificate warnings or handshake errors. While the right thing to do is obviously upgrading your OS certificates and curl, I updated the documentation a little bit to address that issue, rather than suggesting -k|--insecure all the time.

Carmel

I’ve been working on a new CPAN version dependency manager called Carmel. I hope to make this a successor for Carton, but it’s still in a very early stage, but the initial dev version has been shipped to CPAN.I hope to work on this and write more about it in a next few days :)

POP: PAUSE on Plack

As suggested in the last night’s post, charsbar is on fire with converting PAUSE backend to PSGI/Plack from mod_perl.

plenv slowness

I’ve been experiencing some serious slowdown with plenv rehash which is called automatically when you install cpanm via plenv intall-cpanm. Turns out it is partially due to perl bin executables contain a lot of bogus shims themselves, such as xsubpp5.16.1, and the list multiplies by the number of perl versions you have with plenv. I opened an issue on plenv and hope someone will fix it.

cpanf

I wrote cpanf 6 years ago(!) to search for recent modules without waiting for CPAN mirrors to be finished. Because FriendFeed has been shut down, the script won’t work anymore. Rather than updating the script to work with a new backend, I just uploaded a new release saying the script is now deprecated, and you can use cpanm with –dev option, which will force searching modules from MetaCPAN which is updated almost live.