Soar::WM::Slurp - Read and parse Soar working memory dumps
use Soar::WM::Slurp qw(read_wm); use Data::Dumper; my ($WM_hash, $root_name) = read_wm(file => 'path/to/wme/dump/file'); print 'root is ' . $root_name; print Dumper($WM_hash);
Soar::WM::Slurp - Perl extension for slurping Soar WME dump files.
read_wmTakes a named argument, either file => 'path/to/file', file => $fileGlob, or text => 'WME dump here'. Returns a pointer to a hash structure representing the input WME dump, and the name of the root WME, in a list like this: ($hash, $root).
Note that any incomplete WME structures will be ignored; for example:
(S1 ^foo bar ^baz boo ^link S2) (S2 ^faz far ^boo baz ^fuzz buzz
The second line in the above text will be ignored. Although some of the structure there is apparent, accepting incomplete structures would require much more error and input checking. WME dumps are normally complete, so this should not be a problem.
Nathan Glenn <firstname.lastname@example.org>
This software is copyright (c) 2012 by Nathan Glenn.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.