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 valuebar
. - foo&bar
-
Evaluates to value
foo
and valuebar
. - foo|bar
-
Evaluates to value
foo
or reverse of valuebar
. - foo&bar
-
Evaluates to value
foo
and reverse of valuebar
.
METHODS
evaluate
$expr->evaluate({foo => 'bar'});
Evaluates the expression with a hash reference of values and returns the result.