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

Download:
Template-Flute-0.0064.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source   Latest Release: Template-Flute-0.0140

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 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: