Skip to content
jjn1056 edited this page Nov 27, 2011 · 3 revisions

What is this for?

Basically I wanted a wrapper around Module::Install to consolidate my desire to clearly separate installer code (and dependencies) from extra features that authors use. I wanted to put this into git so that I can include this stuff as a submodule in my other projects. That way I can make changes and have them reflected everywhere (instead of having to manual update my previous custom attempt at this.

How to use?

Just add as a git submodule to your existing Perl CPAN style code. Make sure you are in the root of the project.

git submodule add git@github.com:jjn1056/Maker.git maint

Then you call the new module in your Makefile.PL, for example:

#!/usr/bin/env perl

use maint::Maker;

all_from 'lib/Shutterstock/Sandbox.pm';
requires 'Modern::Perl';
test_requires 'Test::Most';
tests_recursive;

We automatically import strict and warnings, and add in the necessary metafile writing, etc. You really just need to list your requires, test and config requires, calls to run tests and any calls to install scripts. You should review the docs for Module::Install, or cargo cult from some other project.

More on git submodules

Here's a decent overview I follow: http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/

Warnings

This is something I am using to help me manage my personal projects, and hopefully help assist people that want to contribute to my projects but maybe get a bit confused about how Module::Install works, and the difference between author and installer dependencies. Over time I will try to add some ease of use features to this. For example you can list the author dependancies via:

perl maint/Maker.pm --authordeps

so you can install them like:

perl maint/Maker.pm --authordeps | cpanm

This is just a start. I hope to expand this to make it easier to jumpstart a local lib, etc., so expect this to change. I recommend that if you want to use this on your person project, you clone it and add the clone as a submodule, rather than my repository directly, so that way I can change things as I please. This is very much work in progress (and I reserve the right to just drop it and use Dist::Zilla for everything :)

Clone this wiki locally