Language::Expr::Compiler::JS
version 0.05
Compiles Language::Expr expression to JS code. Some notes:
Currently strings are rudimentary escaped.
Data dumping modules can't be used currently due to segfaults (at least in 5.10.1).
Variables by default simply use JavaScript variables.
E.g. $a becomes $a, and so on. Be careful not to make variables which are invalid in JavaScript, e.g. $.. or ${foo/bar}.
You can subclass and override rule_var() if you want to provide your own variables.
Functions by default simply use Perl functions.
Used to remember which subexpression need to be parsed later.
Convert Language::Expr expression into Perl code. Dies if there is syntax error in expression.
Steven Haryanto <stevenharyanto@gmail.com>
This software is copyright (c) 2010 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.
To install Language::Expr, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Language::Expr
CPAN shell
perl -MCPAN -e shell install Language::Expr
For more information on module installation, please visit the detailed CPAN module installation guide.