The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Language::Expr::EvaluatorRole - Specification for Language::Expr interpreter/compiler

VERSION

This document describes version 0.29 of Language::Expr::EvaluatorRole (from Perl distribution Language-Expr), released on 2016-07-03.

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}'},
 )

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Language-Expr.

SOURCE

Source repository is at https://github.com/sharyanto/perl-Language-Expr.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Language-Expr

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.