The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Toader Directory Documentation

Page Storage

A directory is stored in $toaderDir.'.toader/index'

The storage used is MIME.

The following headers are should be used.

    renderer
    Date
    From

'renderer' is the name of the renderer to use.

'Date' is a RFC 2822 date.

Rendering

Content

The entry content, the 'renderContent' method, is rendered in three passes.

Pass One

First the body is ran through Text::Template.

No template is used for this pass.

The variables below are passed to Text::Template.

    date - This is the entry name/date stap.
    g - This is a L<Toader::Render::General> object.
    toader - This is a L<Toader> object.
    sec - Seconds value take from the Date header.
    min - Minutes value take from the Date header.
    hour - Hours value take from the Date header.
    day - Day value take from the Date header.
    month - Month value take from the Date header.
    year - Year value take from the Date header.
    zone - Time zone value take from the Date header.
    self - The L<Toader::Render::Entry> object.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.

Pass Two

Second the return results are of the first pass is ran through specified backend.

No template is used for this.

Pass Three

The third pass generates what can be included into something.

The template used is 'entryContent'. The default one is below.

    [== $body ==]

The variaables below are passed to Text::Template.

    body - This is output from pass two.
    date - This is the entry name/date stap.
    g - This is a L<Toader::Render::General> object.
    toader - This is a L<Toader> object.
    sec - Seconds value take from the Date header.
    min - Minutes value take from the Date header.
    hour - Hours value take from the Date header.
    day - Day value take from the Date header.
    month - Month value take from the Date header.
    year - Year value take from the Date header.
    zone - Time zone value take from the Date header.
    self - The L<Toader::Render::Entry> object.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.

Output Rendering.

This is rendered via the 'render' method.

The template used is 'page' with the variables below passed to it.

    toader - The L<Toader> object.
    g - The L<Toader::Render::General> object.
    self - The L<Toader::Render::Entry> object.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    body - The output from the 'content' method.
    locationID - This is the location ID to use, ''.

Once that is created, it is written to $outputDir.'/'.$r2r.'/index.html' . Any files are written to $outputDir.'/'.$r2r.'/.files/' .