The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Build::Hopen::G::Runnable - parent class for runnable things in a hopen graph

SYNOPSIS

Anything with "run" inherits from this. TODO should this be a role?

ATTRIBUTES

need

Inputs this Runnable requires. A Build::Hopen::Util::NameSet, with the restriction that need may not contain regexes. ("Sorry, I can't run unless you give me every variable in the world that starts with Q." I don't think so!)

scope

If defined, a Build::Hopen::Scope that will have the final say on the data used by "run". This is the basis of the fine-grained override mechanism in hopen.

want

Inputs this Runnable accepts but does not require. A Build::Hopen::Util::NameSet, which may include regexes.

FUNCTIONS

run

Run the operation, whatever that means. Must return a new hashref. Must be implemented by subclasses. Usage:

    my $hrOutputs = $op->run([options])

Options are:

-scope

A Build::Hopen::Scope or subclass including the inputs the caller wants to pass to the Runnable. The Runnable itself should use its own "scope", usually by setting $self->scope->outer($outer_scope) within its run() call.

-phase

If given, the phase that is currently under way in a build-system run.

-generator

If given, the Build::Hopen::Gen instance in use for the current build-system run.

See the source for this function, which contains as an example of setting the scope.

passthrough

Returns a new hashref of this Runnable's local values, as defined by "local" in Build::Hopen::Scope. Usage:

    my $hashref = $runnable->passthrough([-scope => $outer_scope])