Author image Peter Hanely
and 1 contributors


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.


        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.

mpi_neighbors($thisnode, $pattern, $obj)

$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;

mpi_prop($thisnode, $propname, $obj)

$propname is the string name of a property. returns propval;

mpi_props($thisnode, $proppat, $obj)

$propat is a string specifier to a property directory or a subset of properties. returns list of propnames;

mpi_propset($thisnode, $propname, $val, $obj)


        perl Makefile.PL
        make install

Or simply copy the file to Language/ under the perl modules directory. README and the man file for this package exist as pod data in


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.



Variable names of alphabetic characters are general MPI use.
Names beginning with an underscore "_" are reserved for mpi internal variables and should not be used by the application.
Names beginning with "\" are suggested for application values placed in the mpi object.

MPI primitives

















{foreach:varname,list,command[,list seperator]}












{lit:expression to not parse}










{mklist:list items}































Public object methods


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:

Around line 245:

You forgot a '=back' before '=head1'