Pake::Rule - Pake::Rule documentation


pake documentation Contained in the pake distribution.

Index


Code Index:

NAME

Top

Pake::Rule

SYNOPSIS

Top

Right now Rules should not be extended.

Description

Top

Rule, executes if the the specified task does not exists and the rule matches the task name


pake documentation Contained in the pake distribution.

package Pake::Rule;

use strict;
use warnings;

sub new{
   my $proto = shift;
   my $class = ref($proto) || $proto;
   my $pattern = shift;
   my $source = shift;
   my $code = sub {};
   $code = shift if ref($_[0]) eq "CODE";

   my $self  = {};

   $self->{"pattern"} = $pattern;
   $self->{"code"} = $code;
   $self->{"source"} = $source;

   bless ($self, $class);
   Pake::Application::add_rule($self);
   return $self;   
}

1;
__END__