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

NAME

Statocles::Theme - Templates, headers, footers, and navigation

VERSION

version 0.001

SYNOPSIS

    # Template directory layout
    /theme/site/layout.tmpl
    /theme/blog/index.tmpl
    /theme/blog/post.tmpl

    my $theme      = Statocles::Theme->new( path => '/theme' );
    my $layout     = $theme->template( site => 'layout' );
    my $blog_index = $theme->template( blog => 'index' );
    my $blog_post  = $theme->template( blog => 'post' );

DESCRIPTION

A Theme contains all the templates that applications need.

When the source_dir is read, the templates inside are organized based on their name and their parent directory.

ATTRIBUTES

source_dir

The source directory for this theme.

templates

The template objects for this theme.

METHODS

read()

Read the source_dir and create the Statocles::Template objects inside.

template( $section => $name )

Get the template from the given section with the given name.

AUTHOR

Doug Bell <preaction@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Doug Bell.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.