Reinventing Build.PL
Leon Timmermans
August 15th 2011
Once upon a time
MakeMaker
Perl -> Makefile -> shell -> Perl
Module::Build
Pure Perl
Module::Build
6000 LOC and 342 methods in one class
BTW, it's lacking a maintainer…
Finding the way out
configure_requirements
Build.PL spec (draft)
The experiment
Module::Build::Tiny
Simplest thing that's useful and correct
Currently only 65 lines
«we stop being fucking idiots and use CPAN»
4 steps
perl Build.PL ./Build ./Build test ./Build install
perl Build.PL
Write a Build script
Save its arguments somewhere
Write a MYMETA.{json,yml} (new)
./Build
Real meat of any module builder
Also the least specified
./Build test
Run tests and summarise the results
TAP::Parser does this for you and more
./Build install
Install files in the right locations.
I extracted ExtUtils::InstallPaths from Module::Build for this.
Authoring?
Dist::Zilla plugin
Only 25 lines (no golfing)
Take home message
Writing a module builder isn't that hard anymore in 2011