Click here to get back home

Yet another interface to SWI-Prolog in mod_perl

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Yet another interface to SWI-Prolog in mod_perl Keenlearner 05-24-2008
Posted by Keenlearner on May 24, 2008, 1:15 pm
Please log in for more thread options
I am trying to run the Yaswi
http://search.cpan.org/~salva/Language-Prolog-Yaswi-0.14/Yaswi.pm
module in mod_perl,

use CGI qw(:standard);
print header;

use Language::Prolog::Yaswi qw(:query :run);
use Language::Prolog::Types::overload;
use Language::Prolog::Sugar functors => { equal => '=',
is => 'is' },
chains => { orn => ';',
andn => ',',
add => '+' },
vars => [qw (X Y Z)];

swi_set_query( equal(X, Y),
orn( equal(X, 27),
equal(Y, 'hello')));

while (swi_next) {
printf "Query=".swi_query()."\n";
printf " X=%_, Y=%_\n\n", swi_var(X), swi_var(Y);
}




at first I got error

[PROLOG SYSTEM ERROR: Thread 1
Recursively received fatal signal 11

PROLOG STACK:
]


It happend to solve that problem in Java, we need to add -nosignals
So I add
swi_init('-nosignals');

But now I got errors of
[Thu May 22 17:07:48 2008] [notice] child pid 13466 exit signal
Segmentation fault (11)
[Thu May 22 17:07:48 2008] [notice] child pid 13492 exit signal
Segmentation fault (11)
[Thu May 22 17:07:48 2008] [notice] child pid 13493 exit signal
Segmentation fault (11)
[Thu May 22 17:07:48 2008] [notice] child pid 13494 exit signal
Segmentation fault (11)
[Thu May 22 17:07:48 2008] [notice] child pid 13495 exit signal
Segmentation fault (11)


Is it possible to run Yaswi in mod_perl ? I got not problem when using
CGI, Thanks.

Similar ThreadsPosted
mod_perl 2.0 and apache 2.2 Undefined subroutine &ModPerl::ROOT::ModPerl::Registry error January 24, 2006, 3:43 pm
modPerl, Apache, and REMOTE_USER November 25, 2006, 2:50 pm
Prototype mismatch under ModPerl::PerlRun September 6, 2005, 5:59 pm
CPAN conflict issue - CGI.pm vs ModPerl::Registry September 25, 2006, 12:42 pm
modperl: HTML::Template not working inside handler February 25, 2008, 2:33 pm
.perldb interface to DDD July 27, 2004, 12:52 am
.perldb interface to DDD July 28, 2004, 2:16 pm
Interface between C and Perl September 5, 2004, 6:15 pm
Website Interface August 15, 2006, 1:25 pm
Web interface to script? September 19, 2007, 5:02 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap