Language::MPI - 2008.0217 Message Parsing Interpreter
Processor for the Message Parsing Interpreter text composition language, based on the MPI found in MU* online environments, adapted for more general semantics.
http://en.wikipedia.org/wiki/Message_Parsing_Interpreter
use Language::MPI; $node = new Language::MPI($noderef); $node->setvar("varname", "varval"); $results = $node->parse("tick {set:varname,{time:}} tock"); $val = $node->readvar("varname");
MPI assumes an operating environment consisting of a set of nodes each of which has a set of named properties. How these nodes and properties are stored and structured is up to the application except that:
noderefs are perl scalars used by application supplied functions. Something with a printable value is encouraged but not required.
properties may be identified by and resolve to plain text strings.
MPI, in the interest of more general usage, expects some support subroutines to be supplied by app to access nodes and properties. Should any of these not be supplied, errors are trapped to prevent crashing. Functions not needing these should still work properly. Should the application designer wish, app data to be passed to these callbacks may be set into and read from the object by the setvar() and readvar() methods.
$thisnode is a noderef. $pattern is a string pattern used to specify which nodes 'neighboring' the current node are of interest. returns list of noderefs;
$propname is the string name of a property. returns propval;
$propat is a string specifier to a property directory or a subset of properties. returns list of propnames;
perl Makefile.PL make make install
Or simply copy the MPI.pm file to Language/ under the perl modules directory. README and the man file for this package exist as pod data in MPI.pm.
Some MPI standard functions incomplete or unimplimented. Testing incomplete.
This code developed using perl 5.8.8. Might work with perl 5.6.0 or older with proper libraries. Uses strict and warning.
Copyright (c)2007 Peter Hanely. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Create new MPI object.
Sets a variable in the mpi object to a scalar value.
Reads a scalar value from the mpi object
Processes a string for MPI codes
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install Language::MPI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Language::MPI
CPAN shell
perl -MCPAN -e shell install Language::MPI
For more information on module installation, please visit the detailed CPAN module installation guide.