|  |  
 |   |   
 NAMEExtUtils::Builder - An overview of the foundations of the ExtUtils::Builder Plan framework VERSIONversion 0.017 DESCRIPTIONThis document describes the foundations of the ExtUtils::Builder Plan framework, including Actions, Nodes and Plans. OVERVIEWAction basicsActions are the cornerstone of the ExtUtils::Builder framework. They provide an interface between build tools (e.g. ExtUtils::MakeMaker, Module::Build, ...) and building extensions. This allows producing and consuming sides to be completely independent from each other. It is a flexible abstraction around pieces of work, this work can be a piece of perl code, an external command, a mix of those or possibly other things. An action can be consumed in many ways. 
 PrimitivesOn primitive actions, all serialization methods will return a single item list. There are two types of of primitive actions shipped with this dist: Command and Code. Commands are essentially an abstraction around a call to an external command, Codes are an abstraction around a piece of Perl code. While these are all implementing the same interfaces, they have their own (hopefully obvious) preferences on how to be treated. "flatten" is just an identity operator for primitive actions. CompositesComposite actions are actions that may consist out of multiple actions (though in some cases they may contain only one or even zero actions). "flatten" will return all its constituents. "execute", "to_code" and "to_command" will all call their respective method on all those values. "preference" is of little use, and will always prefer to flatten when given that option. Nodes Nodes are composite Actions. Nodes are a simple class with three attributes: 
 Essentially, a Node is equivalent to entry in a Makefile PlansPlans are the equivalent of a (piece of a) Makefile. They are a bunch of nodes that should interconnect. It has one attribute. 
 The "run" method will perform a topological sort much like "make". It will check which steps are necessary and skip the ones which are not. RATIONALEWriting extensions for various build tools can be a daunting task. This module tries to abstract steps of build processes into reusable building blocks for creating platform and build system agnostic executable descriptions of work. USAGE package Frobnicator;
 use ExtUtils::Builder::Action::Code;
 ...
 sub add_plans { 
     my ($self, $planner) = @_;
     my $action = ExtUtils::Builder::Action::Code->new(
         code => ...,
     );
     $planner->create_node(
         target => 'frob',
         actions => [ $action ],
     );
     $planner->create_node(
         target => 'pure_all',
         dependencies => [ 'frob' ],
         phony => 1,
     );
 }
 ...
Makefile.PL use ExtUtils::MakeMaker;
 use ExtUtils::Builder::MakeMaker;
 ...
 WriteMakeFile(
   NAME => 'Foo',
   VERSION => 0.001,
   ...,
 );
 sub MY::make_plans {
   my ($self, $planner) = @_;
   Frobnicator->add_plans($planner);
 }
AUTHORLeon Timmermans <fawaka@gmail.com> COPYRIGHT AND LICENSEThis software is copyright (c) 2013 by Leon Timmermans. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. 
 
 |