--- Salvador Fandiņo <[EMAIL PROTECTED]> wrote: > I have uploaded to CPAN version 0.07 of Language::Prolog::Yaswi, > an interface to SWI-Prolog. > > I have also released DBD::Yaswi, an experimental DBI interface to > SWI-Prolog. I am not completely sure if this module is a real > improvement over the raw Language::Prolog::Yaswi... well, > comments are welcome!!!
Hi Salvador, It's great to see stuff happening with this again! When I first tried to isntall DBD::Yaswi, I got: ok 1 - use DBI; install_driver(Yaswi) failed: Can't locate DBD/Yaswi.pm in @INC (@INC contains: <snip> Perhaps the DBD::Yaswi perl module hasn't been fully installed, or perhaps the capitalisation of 'Yaswi' isn't right. Available drivers: DBM, ExampleP, File, Pg, Proxy, SQLite, Sponge. at t/1.t line 6 I just did a force install to see what would happen and I reran the test: ok 1 - use DBI; install_driver(Yaswi) failed: syntax error at /usr/local/lib/perl5/site_perl/5.8.6/DBD/Yaswi.pm line 134, near "Vs qw(Q M N V B)" BEGIN not safe after errors--compilation aborted at /usr/local/lib/perl5/site_perl/5.8.6/DBD/Yaswi.pm line 194. Compilation failed in require at (eval 2) line 3. At line 134, deleting the "Vs" from it makes the DBD load: my @vs = Vs qw(Q M N V B); But a few lines later we get 'can''t call method "length" on unblessed reference': $sth->STORE(NUM_OF_PARAMS => $marks->length); That's when I stopped. Also, from the docs, it's not clear how to build a database or issue queries against it. So let's say I want to find all X and Y that satisfy append/3, would I do something like this? my $dbh = DBI->connect('dbi:Yaswi:user'); my $sth = $dbh->prepare(<<'END_PROLOG'); find [X,Y] where Z=[a,b,c,d], \ append([],X,X). \ append([W|X],Y,[W|Z]) :- append(X,Y,Z). END_PROLOG >From your docs and the tests, that doesn't seem right. Can I load a pre-existing prolog program, call assert, retract, etc? As for the new Language::Prolog::Yaswi, it installed and ran just fine. I even had a little sample program of my own that seemed to work. Thanks! Now to see if it can run on OS X. Cheers, Ovid ===== If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/