Marquee Marquee::SSIHandler - SSI handler base class

TABLE OF CONTENTS

NAME

Marquee::SSIHandler - SSI handler base class

SYNOPSIS

package Marquee::SSIHandler::EPL;
use Mojo::Base 'Marquee::SSIHandler';

sub render {
    my ($self, $path) = @_;
    
    ...;
    
    return $out;
}

DESCRIPTION

This is a SSI handler base class to be inherited by handler classes. The sub class is MUST implement "render" method.

ATTRIBUTES

Marquee::SSIHandler implements the following attributes.

log

Mojo::Log instance. Defaults to $app->log if exists.

$handler->log('/path/to/handler.log');
$path = $handler->log;

CLASS METHODS

Marquee::SSIHandler implements the following class methods.

current_template

Detects current template recursively.

my $current_template = Marquee::SSIHandler->current_template;
my $parent_template = Marquee::SSIHandler->current_template(1);

INSTANCE METHODS

Marquee::SSIHandler implements the following instance methods.

render

Renders templates. The sub classes MUST override(implement) the method.

sub render {
    my ($self, $path) = @_;
    
    ...;
    
    return $out;
}

Somewhere..

$handler->render($path);

render_traceable

Traceably renders templates by stacking template names recursively.

$handler->render_traceable($path);

traceable

Invokes the callback traceable.

$handler->traceable($path, sub {...});

SEE ALSO

Marquee::SSIHandler::EPL, Marquee::SSIHandler::EP, Marquee, Mojolicious