Stefan Hornburg (Racke) > Template-Flute > Template::Flute::Expression

Download:
Template-Flute-0.0130.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Template::Flute::Expression - Parser for expressions

CONSTRUCTOR ^

new

Creates Template::Flute::Expression object.

    $expr = Template::Flute::Expression->new('!username');

Possible expressions are:

username

Evaluates to value username.

!username

Reverse.

foo.bar

Evaluates to value foo.bar, e.g. $values->{foo}->{bar}.

!foo.bar

Reverse.

foo|bar

Evaluates to value foo or value bar.

foo&bar

Evaluates to value foo and value bar.

foo|bar

Evaluates to value foo or reverse of value bar.

foo&bar

Evaluates to value foo and reverse of value bar.

METHODS ^

evaluate

    $expr->evaluate({foo => 'bar'});

Evaluates the expression with a hash reference of values and returns the result.

syntax highlighting: