ExtUti...lanner(3pm)
π NAME π
ExtUtils::Builder::Planner β An ExtUtils::Builder Plan builder.
Okay bestie, this is the ExtUtils::Builder::Planner manpage from the User Contributed Perl Documentation corner of the universe. The header was being dramatic and truncating the name, but weβre using the full one. π
π VERSION π
version 0.020 β yes, thatβs the version. Slay.
β¨ SYNOPSIS β¨
my $planner = ExtUtils::Builder::Planner->new;
$planner->create_node(
target => 'foo',
dependencies => [ 'bar' ],
actions => \@actions,
);
my $plan = $planner->materialize;
πΈ DESCRIPTION πΈ
A Planner is an object that creates a Plan that can be executed.
The primary objective of this class is to gather a set of nodes β triplets of target, dependencies and actions β that represent the building graph. To aid in building this graph, this module provides filesets to filter and transform filenames. Delegates can be mixed into the planner to help build these nodes and filesets. Extensions are a collection of such delegates. Honestly? Iconic little architecture.
π οΈ METHODS π οΈ
π
add_node($node)
This adds an ExtUtils::Builder::Node to the planner. It will also be added to the 'all-files' fileset if itβs a file node. No cap.
β¨ create_node(%args)
This creates a new node and adds it to the planner using add_node. It takes the same named arguments as ExtUtils::Builder::Node.
targetβ the target of the node. This is mandatory, bestie.dependenciesβ the list of dependencies for this node.actionsβ the actions to perform to create or update this node.typeβ this marks the type of the node:fileorphony, defaulting to the former.
merge_plan($plan)
This merges all nodes of the plan to the planner.
add_delegate($name, $sub)
This adds $sub as a helper method to this planner, with the name $name.
create_phony($target, @dependencies)
This is a helper function that calls create_node for a action-free phony target.
create_filter(%options)
This will filter an existing fileset based on a condition, and return the name of the new fileset.
conditionβ if this callback returns true, the file will be included in the new filesets.onβ this sets the input fileset, it defaults to'all-files'.nameβ this sets the name of the new set; if none is given, one will be generated.
create_pattern(%options)
This is a wrapper for add_filter for various common constructs. It takes several named options, and at the moment at least one of file or dir is mandatory.
fileβ a unix glob pattern that each filename is compared to, e.g.'*.pm'.dirβ the directory under which files should be (e.g.'lib').negateβ this negates all the match.onβ this sets the input fileset, it defaults to'all-files'.nameβ this sets the name of the new set; if none is given, one will be generated.
create_subst(%options)
This creates a new node based on the old one (source).
substβ this callback is called for all entries in the input set. It should do two things:- Return the name of the new target node.
- It should add a node to create the target from the source. The node should have source as its dependency.
onβ this sets the input fileset, it defaults to'all-files'.nameβ this sets the name of the new set; if none is given, one will be generated.
add_seen($filename)
This marks a file as existing on the filesystem by adding it to the 'all-files' fileset.
load_extension($extension, $version, %options)
This adds the delegate from the given module. If $version is defined it will verify if the extension is at least that version. load_module is a depreciated alias for this function.
new_scope()
This opens a new scope on the planner. It returns a child planner that shares the build tree state with its parent, but any delegated added to it will not be added to the parent.
run_dsl($filename)
This runs $filename as a DSL file. This is a script file that includes Planner methods as functions. For example:
use strict;
use warnings;
load_extension("Foo");
add_foo("a.foo", "a.bar");
create_subst(
on => create_pattern(file => '*.src'),
subst => sub {
my ($source) = @_;
my $target = $source =~ s/\.src$//r;
return create_node(
target => $target,
dependencies => [ $source ],
actions => [
command('convert', $target, $source),
function(module => 'Foo', function => 'bar'),
code(code => 'print "Hello World"'),
],
);
},
);
This will also add command, function and code helper functions that correspond to ExtUtils::Builder::Action::Command, ExtUtils::Builder::Action::Function and ExtUtils::Builder::Action::Code respectively.
materialize()
This returns a new ExtUtils::Builder::Plan object based on the planner.
self()
This returns the planner.
outer()
This returns the planner matching the outer scope of the current planner object.
π AUTHOR π
Leon Timmermans <fawaka@gmail.com>
π COPYRIGHT AND LICENSE π
This 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.
π
This page was rendered by perl v5.40.1 on 2026-02-23, bestie. Thanks for reading β you ate. π
π¦ where this page comes from
- ubuntu stonking: libextutils-builder-perl 0.020-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms