I got really excited about this module when I discovered it. The Math::Logic part is great, and I really liked the interface for Math::Logic::Predicate. There are a few things I don't like about it though. My peeves, in order of decreasing importance:
* lack of a cut oprerator ('!' in Prolog)
* lack of list operators (particularly the '[Head|Tail]' construct from Prolog)
* heavy use of eval within the module itself
* lack of predicates with variable-length argument lists
* lack of an OR operator (';' in Prolog)
I had used the Language::Prolog extension (more alpha/beta code) for a while and while this module is better, it's still not really usable as a Prolog-style interpreter. The lack of the cut operator is the main problem.
When I found out the module didn't support cuts I lost a lot of interest in it. If I didn't think it was that important, I'm sure I could have found some hacky way of simulating Prolog-style lists using custom Perl routines. It wouldn't have looked nice, but I would have been able to live with this weird hybrid style (probably borrowing lisp's cons, car and cdr instead of the lexicals [, | and ]) so long as I could at least still rely on Math::Logic::Predicate to do Unification properly for me.
Heavy use of eval is also a problem since it restricts me to using only code I can trust. I'd like to store predicates and rules in a database or YAML files, but I'm left with a huge problem of verifying that user-supplied predicates and rules aren't filled with nasty code. Also, since this module allows you to specify predicates in Perl, you can effectively write arbitrarily nasty code... I suspect that eval adds significant overhead as well, but I can probably live with that for the applications I have in mind.
If this module just had the cut operator implemented over and above what's already there it would really rock. Anybody interested in implementing it in this module? Alternatively, does anyone know of any other Perl modules for interfacing with a real (and free) Prolog interpreter?
Thanks,
dec