http://www.perlmonks.org?node_id=616774


in reply to Fishing for constraint => SQL designs

Hmmm nobody biting yet? This comes up often like in Rules-based Perl? in 2001. I even wanted something declarative a number of times myself. Kind of didn't want to answer hoping someone would have some info but okay let's get the dialog flowing.. left field: You could use AI::Prolog which is pure perl, which is a good thing. And you could use Draxler's PrologSQL compiler of sqi-prolog to sql or Ciao Prolog to SQL bridges there's the pl2sql tool.(Ciao Prolog).

Not that I've used or recommend these. I wish there was something elegant and natural languageish. Where's theDamian when you need him.. Well okay there is something intriguing over here, CAPE which mixed CLIPS with perl. But the links are dead... ah here we are.

As its name suggests, CAPE is a combined programming environment which allows programs to be written in Clips, a forward-chaining rule-based system which was originally developed by NASA, and Perl. Clips rules can call Perl code from either side (i.e. from either the "pattern" part, or the "action" part). Perl can add information to the Clips working memory, and can interact with objects defined using the Clips Object Oriented Language (COOL). CAPE provides mechanisms for switching information between the two programming systems, allowing the programmer to exploit the strengths of both