DEV Community

Mike Stemle
Mike Stemle

Posted on

I love `carton`, and you should to.

This one will be quick, promise!

Hacktoberfest is upon us once again, it's the most wonderful time of the year! That said, it's also the time where you dust off repositories that you haven't touched since last Hacktoberfest and realize that you cleaned up the dependencies you were using. This, of course, leads to much frustration as you play whack-a-mole with the dependencies that you need. Granted, in Perl that's not as hard as it can be with Java or C++, but if you're doing it the "old fashioned way" where you simply hope you documented your dependencies, then you're in for a rough September 30th my friend!

Well, that's what just happened to me. Well enough is enough!

I've been using Carton a lot more lately, for work (https://github.com/washingtonpost/org-version-trawler) and now I'm also using it for play (https://github.com/net-amqp-rabbitmq/net-amqp-rabbitmq)!

What was that? I forgot to install Module::CAPIMaker after I cleaned up my Perl install? Grumble.

Let me just create my ./cpanfile...

And there you have it. I now have my package management working. One quick note about paths, though: you either need to add local/lib/perl5 to your PERL5LIB, or you can simply prefix all of your commands with carton run COMMAND_HERE and it'll manage the paths for you.

See? That was quick.

Now I'm off to carton install and cut this new build for Net::AMQP::RabbitMQ. Since it's October first somewhere, I'm hopeful that this counts as my first PR for Hacktoberfest 2020!

Oldest comments (0)