Math::Expression version 1.11 ============================= This module solves the problem of evaluating expressions read from config/... files without the use of eval. String and arithmetic operators are supported, as are: conditions, arrays and functions. The name-space is managed (for security), user provided functions may be specified to set/get variable values. Error messages may be via a user provided function. This is not designed for high computation use. Quick example: use strict; use Math::Expression; my $ArithEnv = new Math::Expression; # Some/all of these read from a config file: my $tree1 = $ArithEnv->Parse('ConfVar := 42'); my $tree2 = $ArithEnv->Parse('ConfVar * 3'); ... $ArithEnv->Eval($tree1); my $ConfValue = $ArithEnv->EvalToScalar($tree2); For examples of use see the test program: TestExpr.pl POD documentation is in the module. You install the module by running these commands: perl Makefile.PL make make test make install Please report any bugs/suggestions to Alain Williams COPYRIGHT /\ / \ (C) Copyright 2003 Parliament Hill Computers Ltd. \ / All rights reserved. \/ . Author: Alain Williams, January 2003 . addw@phcomp.co.uk . . SCCS: @(#)README 1.2 03/25/03 13:47:44 This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. You must preserve this entire copyright notice in any use or distribution. The author makes no warranty what so ever that this code works or is fit for purpose: you are free to use this code on the understanding that any problems are your responsibility. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Note that the version number of this README may be different from the version of the module. The version number at the top of this file should correspond to the version number of the module at the time that it was bundled into a tar file.