NAME

CatalystX::ASP::Compiler - Role for CatalystX::ASP providing code compilation

SYNOPSIS

use CatalystX::ASP;
with 'CatalystX::ASP::Compiler';

sub execute {
  my ($self, $c, $scriptref) = @_;
  my $parsed = $self->parse($c, $scriptref);
  my $subid = $self->compile($c, $parsed->{data});
  eval { &$subid };
}

DESCRIPTION

This class implements the ability to compile parsed ASP code.

METHODS

$self->compile($c, $scriptref, $subid)

Takes a $scriptref that has been parsed and $subid for the name of the subroutine to compile the code into. Returns

$self->compile_include($c, $include)

Takes an $include file. This will search for the file in IncludesDir and parse it, and assign it a $subid based on it's filename.

compile_file

Takes an $file assuming it exists. This will search for the file in IncludesDir and parse it, and assign it a $subid based on it's filename.

$self->register_include($c, $scriptref)

Registers the file file of any calls to $Response->Include() so as to prevent infinite recursion

SEE ALSO

CatalystX::ASP, CatalystX::ASP::Parser,