I worked on App-Easer.

A few years ago I coded a client for a project I was working on, where I needed to support a hierarchy of sub-command. Something like the Git command-line interface client.

At the time, I looked into App::Cmd but decided that I didn’t like it. I’m not sure why exactly, because it was about 8 years ago, but I sort of remember a few reasons:

  • I didn’t like how command-line options were specified;
  • there were (are) a ton of dependencies;
  • every command is coded as a class - and I had a lot of commands, so it felt like a huge amount of work.

So, of course, I decided to roll my own module, which I never released because… it worked for me, and didn’t have much docs and tests. Then I moved onto other stuff and forgot about it.

The main point of the implementation was to make it extremely easy to implement a command by providing a few metadata and a sub reference with the command’s implementation (most of the time a call to an API library, coded separately). I kept the basic idea of making it possible to have commands-as-subclasses, though.

Fast forward to some days ago, when I decided to revive it and at least start sharing. So after a good clean-up and writing a lot of documentation. This resulted in App-Command.

Except that it’s quite complicated. Still useable, but after a good amount of refactoring and reorganizing, I had the distinct impression that it could be simplified a lot, to the point of totally getting rid of the whole object-oriented implementation with a lot of classes and sub-classes, to adopt a much leaner approach based mostly on a data structure describing the application.

It ended up that my impression was right: this was definitely doable, keeping basically all the functionalities, keeping much if not all of the customization capabilities where everything can be overridden… but with much less code. So please, enter App-Easer.

There is still a lot to do, like writing a few example applications, a tutorial, complete the manual with the gory details for expanding, etc. but I think it’s useable.

I hope it will not take ma another eight years to release it on CPAN!

Comments? Octodon, , GitHub, Reddit, or drop me a line!