| pake documentation | Contained in the pake distribution. |
Pake::FileCreationTask
use Pake::FileCreationTask;
$file_task = Pake::FileCreationTask->new($code,$name,$dependency_array_ref);
$file_task->invoke();
File creation task, executes if the file with the same name does not exists
Overview of overriden methods in the FileTask object
needed
Needed only if the specified file does not exists
timestamp
Returns file timestamp. If the file don't exists it returns... nothing
| pake documentation | Contained in the pake distribution. |
package Pake::FileCreationTask; our $VERSION = '0.2'; use strict; use warnings; our @ISA = qw(Pake::Task); sub needed{ my $self = shift; my $stamp; $stamp = $self->timestamp(); return 1 unless -e $self->{"name"}; } sub timestamp{ my $self = shift; if(-e $self->{"name"}){ return(stat($self->{"name"}))[9]; } } 1;