A simple way to specify dependencies

作者:   發佈於:  

Question: What is the simplest and quickest way for a developer to specify a list of dependent CPAN modules so that other developers can easily install them ?

My answer: add a cpanfile in your app directory with content like this:

# cpanm < cpanfile
Plack
Web::Hippie
Plack::Middleware::ReverseProxy

And the installation is just as simple as cpanm < cpanfile. This is very easy. If the app itself does not have to be installed, which is often true, this is a very quick and simple solution.

The idea is from Bundler, which is a great local::lib-like tool for Ruby developing, but it does a lot more.