NAME
Daiku::Registry - Daiku's engine
SYNOPSIS
use autodie;
my $daiku = Daiku->new();
$daiku->register( Daiku::Task->new( dst => 'all', deps => [qw/a.out/] ) );
$daiku->register(
Daiku::File->new(
dst => 'a.out',
deps => [qw/b.o c.o/],
code => sub {
my $task = shift;
system "cc -o @{[ $task->dst ]} @{[ join ' ', @{$task->src} ]}";
}
)
);
$daiku->register(
Daiku::SuffixRule->new(
src => '.c',
dst => '.o',
code => sub {
my ( $src, $dst ) = @_;
system "cc -c $dst $src";
}
)
);
$daiku->build('all');
DESCRIPTION
Daiku::Registry is a central registry of Daiku tasks.
METHODS
my $daiku = Daiku::Registry->new();
-
Create a new instance of Daiku::Registry.
$daiku->register($task : Daiku::Task|Daiku::SuffixRule|Daiku::File) : void
-
Register a task with the Daiku::Registry.
$daiku->build($target : Str) : void
-
Build a
$target
.
AUTHOR
Tokuhiro Matsuno