NAME
Language::Expr::EvaluatorRole - Specification for Language::Expr interpreter/compiler
VERSION
version 0.21
METHODS
parse_dquotestr($raw_parts) -> [{type=>"STR"|"VAR"}, value=>...}, ...]
Instead of parsing parts themselves, consumers can use this method (typically in their rule_dquotestr). This method converts each Expr escapes into Perl string and variables. For example:
parse_dquotestr('abc', "\\t", '\\\\', '$foo', ' ', '${bar baz}') -> (
{type=>"STR", value=>'abc\t\\'},
{type=>"VAR", value=>'foo'},
{type=>"STR", value=>' '},
{type=>"VAR", value=>'bar baz'},
)
parse_squotestr($raw_parts) => [{type=>STR, value=>...}, ...]
Instead of parsing parts themselves, consumers can use this method (typically in their rule_squotestr). This method converts Expr single quoted string into Perl string.
parse_dquotestr('abc', "\\t", '\\\\', '$foo', ' ', '${bar baz}') -> (
{type=>"STR", value=>'abc\t\\$foo ${bar baz}'},
)
AUTHOR
Steven Haryanto <stevenharyanto@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Steven Haryanto.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.