NAME

Pake::Task 

SYNOPSIS

use Pake::Task;
$task = Pake::Task->new($code,$name,$dependency_array_ref);
$task->invoke();

Description

Task is highly coupled with Pake::Application. The constructor registers new blessed Task variable in the Pake::Application. Task is a starting point to add new functionality to pake. You should extend it, and call the super constructor or manually add task in Pake::Application

Methods

Overview of all methods avalailable in the Syntax.pm

new

First parameter is block of code, executed when the task is invoked. Second parameter is name of the task (you specify it during pake usage, pake task1) pointing to the table with dependendant tasks (task {} "name" => ["dep1","dep2"];

execute
C<$task->execute()>
It runs the code block passed in the constructor
invoke
C<$task->invoke()>
The method invokes all dependant tasks, checks if the file changed and eventually executes the task
invoke_prerequisites
invokes all task dependencies
needed
check if exection of task is needed
default 1
timestamp
this method should return the file stamp if the task is a file abstraction
desc
Set/Get method for task description
name
Set/Get method for task name
code
   Set/Get method for task code