Mission (Almost) Accomplished
Tags: perl, cpan, abandonware, httpthis
Published: 2023-05-17 16:51:58

---
title: Mission (Almost) Accomplished
published: true
date: 2023-05-17 16:48:28 UTC
tags: perl,CPAN,abandonware,cpan,httpthis
canonical_url: https://perlhacks.com/2023/05/mission-almost-accomplished/
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/67r6v6il68sgy71i6m0f.jpg
---

[This post might sound like I’m angry at people making it hard to make progress on some things. That’s not the case at all. I realise completely that people have limited time and they get to choose how they spend it. If people are too busy elsewhere or have moved on to other projects then that’s just how it is and we need to deal with that the best we can.]

Back in December 2020, I [wrote a blog post](https://dev.to/davorg/the-story-behind-a-new-module-2gkp) about how I wanted to fix a long-standing problem with [App::HTTPThis](https://dev.to/davorg/the-story-behind-a-new-module-2gkp). I’m happy to report that two and a half years later, the problem has been fixed.

To summarise my previous blog post:

- App::HTTPThis allows you to run a tiny web server that will serve the contents of a directory over HTTP. But, unfortunately, it doesn’t support default pages like “index.html”.
- App::HTTPThis uses [Plack::App::Directory](https://metacpan.org/pod/Plack::App::Directory) (which is part of the [Plack](https://metacpan.org/pod/Plack) distribution) to do the work – so it’s that which actually doesn’t support “index.html”.
- People suggested [Plack::Middleware::DirIndex](https://metacpan.org/pod/Plack::Middleware::DirIndex), but that also didn’t quite do the right thing.
- I submitted [a pull request on Plack::App::Directory](https://github.com/plack/Plack/pull/654) to add support for “index.html”.
- I wrote a new module called [Plack::App::DirectoryIndex](https://metacpan.org/pod/Plack::App::DirectoryIndex) which was like Plack::App::Directory but with added support for “index.html”.
- I submitted a pull request on App::HTTPThis to use my module in place of Plack::App::Directory.

Now read on…

Both of my pull requests went unactioned for months. In the end, I decided to approach the Perl modules list to ask if I could get co-maintainer permission on App::HTTPThis (it looked like the original maintainer had lost interest – there hadn’t been a release since 2010). When I heard nothing back, I put the project to one side only occasionally returning to add a new comment on my two pull requests.

Then last month I decided I’d have another go at getting co-maintainer permissions. This time it worked and, earlier this week, I got an email from Neil Bowers saying that the previous maintainer had agreed to give me permission and that I could now upload the module to CPAN.

At that point, I realised that the release mechanism for the module was based on Dist::Zilla and also that fashions in the Dist::Zilla world had changed since App::HTTPThis had last been released. This meant that many of the plugins used had been deprecated and I had to [do a bit of work](https://github.com/davorg/app-htttpthis/commit/9bdc04fcf80e3ec1c606867d0a6d56794506684b) to even release the module (which led to [a small rant on Reddit](https://www.reddit.com/r/perl/comments/13ib46n/distzilla_considered_annoying/)).

But I managed to release [version 0.003](https://metacpan.org/release/DAVECROSS/App-HTTPThis-0.003/view/lib/App/HTTPThis.pm) to CPAN. Only to realise very soon afterwards that my Dist::Zilla-wrangling had missed an important fix. [I fixed that](https://github.com/davorg/app-htttpthis/commit/57e29f304e2aef1601f54886b25ec8a9bb0d05d6) and released version 0.004.

I then got an email from PAUSE telling me that I didn’t have permission to release the module. It seems this was [a known PAUSE bug](https://github.com/andk/pause/issues/372#issuecomment-1548519281) and Neil was able to apply a workaround for me. I was able to release [version 0.004](https://metacpan.org/release/DAVECROSS/App-HTTPThis-0.004/view/lib/App/HTTPThis.pm).

All of which means I now have a version of App::HTTPThis (and its included program, [http\_this](https://metacpan.org/release/DAVECROSS/App-HTTPThis-0.004/view/bin/http_this)) which supports default pages. You just have to type, for example:

```
$ http_this --autoindex .
```

And the current directory will be served over HTTP. Also (and this is the important bit!) if you have a file called “index.html” then that will be used instead of the server displaying a directory listing. It’s a tiny improvement, but one that will be very useful to me. And well worth the two and a half years I’ve invested in getting it released.

So why do I say that the mission is only “almost” completed? Well, there’s still that outstanding pull request on Plack::App::Directory. If that ever gets applied, I’ll remove Plack::App::DirectoryIndex from App::HTTPThis (and mark it as deprecated on CPAN).

This is, of course, a supremely unimportant fix in the grand scheme of things. But I think it illustrates an important issue that the Perl community should be thinking about. The community is shrinking. Or, at least, the part of the community that supports CPAN modules and runs our important infrastructure is shrinking. CPAN is full of modules that are now unsupported. I’ve lost count of the number of bugs I’ve reported or patches I’ve supplied that have been ignored because the module author is no longer interested. In some cases, I’ve taken over the module myself, but that’s not a scalable solution. Honestly, I don’t know what it is. But I do think that relying on CPAN modules has got harder over the last few years. And it’s not going to get easier any time soon.

The post [Mission (Almost) Accomplished](https://perlhacks.com/2023/05/mission-almost-accomplished/) appeared first on [Perl Hacks](https://perlhacks.com).