Scott McWhirter > Template-Teeny > Template::Teeny::Stash

Download:
Template-Teeny-0.00_002.tar.gz

Dependencies

Annotate this POD

Source  

NAME ^

Template::Teeny::Stash - Object containing stashed variables

SYNOPSIS ^

    my $stash = Template::Teeny::Stash->new({
        a => 1,
        ...
    });

    $stash->add_section('section_foo', $other_stash);

Objects of this class store the variables and sections for use with templates.

METHODS ^

new

Basic constructor

get

 # TODO Add filter support

  $stash->get('variable1');

This returns the variable of the supplied name in this stash.

add_section

  $stash->add_section('topsection', $other_stash);

This adds a stash to the named section.

sections

  $stash->sections('somesection');

This returns the stashes that have been added to the named section.

vars

  $stash->vars();

This is an accessor for the variables associated with this stash.

BUILDARGS

This is a moose thang.

syntax highlighting: