DBD::Yaswi - A DBI interface to SWI-Prolog
use DBI; my $db=DBI->connect('dbi:Yaswi:user'); my $sth=$db->prepare('find [X, Y] where Z=[1,2,3,4,5], \ member(X,Z), member(Y,Z), X>Y'); $sth->execute; while(my @r=$sth->fetchrow_array) { printf "X=%_ Y=%_\n", @r; } my $sth1=$db->prepare('find [X,Y] where Z=(?),\ member(X, Z), member(Y, Z), \ X>Y, \+ member(Y, (?))'); $sth1->execute([1..100], [map{int(100*rand)}1..30]); while(my @r=$sth->fetchrow_array) { printf "X=%_ Y=%_\n", @r; } $sth2=$db->prepare('insert foo(?)'); foreach (qw(foo bar doo moz goo too)) { $sth2->execute($_); }
Salvador Fandiño, <sfandino@yahoo.com>
Copyright 2005 by Salvador Fandiño
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Fandiño,'. Assuming CP1252
To install DBD::Yaswi, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBD::Yaswi
CPAN shell
perl -MCPAN -e shell install DBD::Yaswi
For more information on module installation, please visit the detailed CPAN module installation guide.