Mark Nodine > Slay-Maker-0.08 > Slay::MakerRule

Download:
Slay-Maker-0.08.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.06   Source  

NAME ^

Slay::MakerRule - a class for making things with dependencies

SYNOPSIS ^

   use strict ;

   use Slay::MakerRule ;

   $t1 = Slay::MakerRule->new( { rule => [
      \@target,         ## Filenames made by \@actions
      \@dependencies,   ## Files or Slay::MakerRule objects
      \@actions,        ## Command lines or sub{}
      ] }
   ) ;

Any or all of the three parameters may be scalars if there is only one thing to pass:

   $t1 = Slay::MakerRule->new( { rule => [
      $target,
      $dependency,
      $action,
      ] }
   ) ;

New can also be called with separate hash elements for each part:

   $t1 = Slay::MakerRule->new( { 
      PATS => \@target,         ## Filenames made by \@actions
      DEPS => \@dependencies,   ## Files or Slay::MakerRule objects
      ACTS => \@actions,        ## Command lines or sub{}
      ] }
   ) ;

DESCRIPTION ^

var_expand_dep($dependency,$target,$matches)

Static function, mostly for internal use. Called by "check" to expand variables inside a dependency. Returns the expanded string.

Recognized expansions:

$digits, ${digits}

Expands to the value of $matches->[digits-1] (like in the normal s/// operator)

$TARGET, ${TARGET}

Expands to the value of $target

$ENV{name}

Expands to the value of the environment variable name.

check

Builds the queue of things to make if this target or its dependencies are out of date.

exec

Executes the action(s) associated with this rule.

targets

returns either ( target1, target2, ... ) or "target1, target2, ..." depending on context.

matches

Checks the target list to see if it matches the target passed in.

syntax highlighting: