++ed by:
TOSHIOITO NQOUNET ADAMJS

3 PAUSE users
5 non-PAUSE users.

MATSUNO★…Tokuhiro
and 1 contributors

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

This is a engine of Daiku. This module is a registrar of daiku.

METHODS

my $daiku = Daiku::Registry->new();

Create new instance of Daiku::Registry.

$daiku->register($task : Daiku::Task|Daiku::SuffixRule|Daiku::File) : void

Register a task for Daiku::Registry.

$daiku->build($target : Str) : void

Build a $target.

AUTHOR

Tokuhiro Matsuno