views:

197

answers:

1

I posted this question looking for something similar to Buildout for Perl. I think Shipwright is what I'm looking for but I'm not really sure. I've played around with it and I created a project, imported all of my source and dependencies and I've exported everything to a vessel then the documentation sort of just stopped. What do I do with a shipyard vessel? Do I do my actual development work in the vessel, or do I do my development in the Shipyard? I'm assuming that the vessel is only for deployment, but how do I actually deploy a vessel to a web server (say I'm using linux, apache and just running straight cgi).

Is Shipwright the right thing for what I'm trying to accomplish or is there something else that would be more appropriate? Ideally I could use Shipwright similar to how I use Buildout. I use Buildout to create a nice isolated environment for my development, and also I use Buildout when deploying to live servers to manage all of my application's dependencies.

EDIT: Here are the highlights of what I can do with Buildout that I would like to be able to do in Perl.

With Buildout, I have a file in my codebase that lists dependencies (which for Perl would either be CPAN modules or other source repositories). I can run a bootstrap script that will fetch all of those dependencies and drop them into a directory within my project and NOT install them at a system level. Buildout also creates utility scripts which can do anything you want (run tests, other command line tools, anything really) and those scripts explicitly add the dependencies to the path so that as my scripts are running all of my dependencies are available to be imported.

What this really does very well is that it allows me to manage my dependencies without having to ever install anything at a system level. Which makes changing from one version to another very easy. Also, it allows me to have multiple Buildout projects running on the same system using different versions of the same module. Finally, one huge benefit is that with Buildout's directory structure, I can just commit the dependencies to source control and to deploy to a new machine I just need to do a checkout and all of my dependencies are already satisfied without having to touch anything installed at a system level.

+1  A: 

I don't think you'll find anything exactly like Buildout in Perl, but you could put together a couple of things that would do the trick.

You could use a standard Build.PL script for Module::Build for managing your dependencies and having commands to run tests, etc.

Then you could use cpanminus to do the installation of those dependencies into a local (non-system) directory.

Then you might be able to use Shipwright to do the bundling and deployment of the project with these now-local dependencies.

mpeters
@mpeters - I like the sound of that. From the sounds of it I don't think I'll need Shipwright with Module::Build and cpanminus. I'll take a look at those, thanks!
Matthew J Morrison
@mpeters - it sounds like this could behave similarly to buildout, however it also involves a lot of manual work (installing each dependency individually is what I'm trying to avoid), I'm looking for something completely automated. Maybe I'll just need to develop my own automated localized environment that will use cpanm under the covers.
Matthew J Morrison
@matthew - Module::Build has a "installdeps" target that will install all the dependencies and their dependencies. I don't know if there's an easy way to hook cpanm into that and I don't know the easiest way to tell it to using something like local::lib to install things locally, etc. But that should get you started.
mpeters