sethd.org
this is not the blog you're looking for

Resume
LinkedIn

RECENT ENTRIES

Done With Blogging
MetaCPAN
I Am Now On Twitter. World Officially Ends.
More Info About Perl 5.14
Perl 5.14 has been released
The Year of Perl 5.10
PSGI is the Limit
Magical Moose
Accessor Benchmarks
Reviewing Perl Best Practices After 7 Years
Interesting Modules 2011-03-19
Book Blogging: The Uplift War
Book Blogging: Childhood's End
Interesting Modules 2011-02-20
Perl Programming Best Practices 2011
Modern Perl Available For Free
Bloated Perl Applications
Five Test::More Features You Might Not Be Using Yet
Perl.LA
How To Identify A Good Perl Programmer
Interesting Modules 2011-01-11
Hudson's Future
Moose Ecosystem
Shaking Up Subversion Responses
Dist::Zilla Walkthrough
Mailing Lists vs. IRC
Shaking Up Subversion
Module Count Shmodule Count
Book Blogging: The Definitive Guide To Catalyst
Book Blogging: Blackout / All Clear
Interesting Modules 2010-12-04
Book Blogging: Macroscope
Upcoming Perl Books
Use A String Like A Filehandle
Moose and Build
Running the Bases...Quickly
Pennant
Interesting Modules 2010-10-16
Went to Perl Mongers Last Night
Book Blogging: The Many Deaths of the Firefly Brothers
Book Blogging: Rainbows End
Interesting Modules 2010-09-03
36th Birthday
Book Blogging: Startide Rising
Feb 07, 2010

Module::Build is useful for more than bundling

I don't know how many people use Module::Build for more than bundling of code for CPAN. In fact I've been using it for years to help organize and build up my base of custom modules.

Typically this involves subclassing Module::Build and then adding a number of new features using its API. The documentation isn't terrible (but it could be better), but I'd still recommend looking at the code in Module::Build::Base whenever you are stuck trying to figure something out.

By default Module::Build only knows about a few directories. If you need to have files installed in any other directories than you can either modify the Build.PL file or you can add that information to a subclass and use it across all of your code. I'd recommend the latter. One particularly nice trick is to associate certain directories with XS (or other compiled code) and have Module::Build build it automatically for you.

Another nice thing about using a subclass of Module::Build is that now you can have a central source of file policy. i.e. a central location that dictates that certain files go here and that other types of files go there. Taking this out of the hands of each module is desirable for any project larger than a few modules.

Of the similar modules I have looked at Module::Build is the best. If nothing else it is much better than Makefile.PL.

Tags: , , .
[p] Posted @ 21:00 by Seth


This site uses the very simple and easy to use blosxom blogging software.


Advanced Search

PERL BLOGS

PERL RELATED OTHER SITES