AI-Prolog

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

      doesn't appear to be needed and doesn't have a way to boostrap
      that requirement into place anyway.

      Also, just upgrade from a "developer" version to prod because
      none of this is really all that production quality anyway. Or
      rather... this is just as worthy anyway.

0.735_01 2006-07-31
      Added perlcall2/2.
      TODO: need ground/1 to constrain the 2nd arg to perlcall2/2.
      Added Scalar::Util to the pre-reqs. It was already required.
      Used Hash::Util::lock_keys to lock down object internals access.
      First release by JJORE.

0.734 2006-04-05
      Added minimum requirement of ExtUtils::MakeMaker 6.30 due to bug report
      filed on RT.  Thanks to zby for the catch.
      Added a copy of the Perl Review article on logic programming.  Thanks to
      brian d for and the Perl Review for allowing me to republish this
      article.

lib/AI/Prolog/Engine/Primitives.pm  view on Meta::CPAN

    FAIL;
};

$PRIMITIVES[4] = sub {    # consult/1
    my ( $self, $term, $c ) = @_;
    my $file = $term->getarg(0)->getfunctor;
    if ( open my $fh, '<', $file ) {

        # Avoid do { local $/; <$fh> }. This triggers a bug where
        # *two* copies of the string are made. Double space is
        # required.
        my $prolog;
        {
            local $/;
            $prolog = <$fh>;
        }
        $self->{_db}->consult($prolog);
        return CONTINUE;
    }
    else {
        warn "Could not open ($file) for reading: $!";

t/01pod.t  view on Meta::CPAN

#!/usr/bin/perl -w
use strict;
use Test::More;
eval "use Test::Pod 1.06";
plan skip_all => "Test::Pod 1.06 required for testing POD" if $@;
all_pod_files_ok();

t/40parser.t  view on Meta::CPAN

#!/usr/bin/perl
# '$Id: 40parser.t,v 1.6 2005/08/06 23:28:40 ovid Exp $';
use warnings;
use strict;
use Test::More;
BEGIN {
eval 'use Test::MockModule';
if ($@) {
    plan skip_all => 'Test::MockModule required for this';
} else {
    plan tests => 76;
}
}
#use Test::More 'no_plan';

my $CLASS;
BEGIN
{
    chdir 't' if -d 't';

t/70builtins.t  view on Meta::CPAN

#!/usr/bin/perl
# '$Id: 70builtins.t,v 1.7 2005/08/06 23:28:40 ovid Exp $';
use warnings;
use strict;
use Test::More;
BEGIN {
eval q{
use Test::MockModule;
use Test::Differences};
if ($@) {
    plan skip_all => "Test::MockModule, Test::Differences required for this";
} else {
    plan tests => 39;
}
}
#use Test::More qw/no_plan/;
use Clone qw/clone/;

BEGIN
{
    chdir 't' if -d 't';

t/99regression.t  view on Meta::CPAN

#!/usr/bin/perl
# '$Id: 99regression.t,v 1.4 2005/08/06 23:28:40 ovid Exp $';
use warnings;
use strict;
use Test::More;
BEGIN {
eval q{use Test::MockModule};
if ($@) {
    plan skip_all => "Test::MockModule, Test::Exception required for this";
} else {
    plan tests => 5;
}
}
#use Test::More qw/no_plan/;

BEGIN
{
    chdir 't' if -d 't';
    unshift @INC => '../lib';



( run in 0.359 second using v1.01-cache-2.11-cpan-0a6323c29d9 )