Alien-SWIProlog
view release on metacpan or search on metacpan
"Role::Tiny::With" : "0",
"base" : "0",
"constant" : "0",
"perl" : "5.006",
"strict" : "0",
"warnings" : "0"
}
},
"test" : {
"requires" : {
"Data::Dumper" : "0",
"Path::Tiny" : "0",
"Test2::V0" : "0",
"Test::Alien" : "0",
"Test::Alien::Diag" : "0",
"perl" : "5.006"
}
}
},
"release_status" : "stable",
"resources" : {
---
abstract: 'Alien package for the SWI-Prolog Prolog interpreter'
author:
- 'Zakariyya Mughal <zmughal@cpan.org>'
build_requires:
Alien::Build: '0.32'
Alien::Build::MM: '0.32'
Data::Dumper: '0'
ExtUtils::CBuilder: '0'
ExtUtils::MakeMaker: '6.52'
File::Which: '0'
List::Util: '1.33'
Path::Tiny: '0'
Test2::V0: '0'
Test::Alien: '0'
Test::Alien::Diag: '0'
perl: '5.006'
configure_requires:
Makefile.PL view on Meta::CPAN
"DynaLoader" => 0,
"Env" => 0,
"File::Spec" => 0,
"Role::Tiny::With" => 0,
"base" => 0,
"constant" => 0,
"strict" => 0,
"warnings" => 0
},
"TEST_REQUIRES" => {
"Data::Dumper" => 0,
"Path::Tiny" => 0,
"Test2::V0" => 0,
"Test::Alien" => 0,
"Test::Alien::Diag" => 0
},
"VERSION" => "0.002",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"Alien::Base" => "0.038",
"Alien::Build" => "0.32",
"Alien::Build::MM" => "0.32",
"Alien::Role::Dino" => 0,
"Capture::Tiny" => 0,
"Class::Method::Modifiers" => 0,
"Data::Dumper" => 0,
"DynaLoader" => 0,
"Env" => 0,
"ExtUtils::CBuilder" => 0,
"ExtUtils::MakeMaker" => "6.52",
"File::Spec" => 0,
"File::Which" => 0,
"List::Util" => "1.33",
"Path::Tiny" => 0,
"Role::Tiny::With" => 0,
"Test2::V0" => 0,
use alienfile;
use Env qw(@CMAKE_INCLUDE_PATH @CMAKE_LIBRARY_PATH);
use Config;
use DynaLoader ();
use Data::Dumper;
use File::Basename qw(dirname);
# Also need Alien::SWIProlog::Util
use lib dirname(__FILE__) . "/lib";
requires 'Path::Tiny';
requires 'File::Which';
# For system probe
requires 'List::Util', '1.33';
$build->log("Trying SWI-Prolog binary $PL ($PL_path)");
$PLVARS = Alien::SWIProlog::Util::get_plvars($PL);
keys %$PLVARS and last;
};
}
probe sub {
my $build = shift;
eval 'require Alien::SWIProlog::Util';
local $Data::Dumper::Terse = 1;
local $Data::Dumper::Sortkeys = 1;
find_PL($build);
# when not found
return 'share' unless keys %$PLVARS;
$build->log( Dumper($PLVARS) );
my %threads_support = (
swipl_threads => $PLVARS->{PLTHREADS} eq 'yes',
use Test2::V0;
use Test::Alien;
use Test::Alien::Diag;
use Alien::SWIProlog;
use DynaLoader;
use Path::Tiny;
use Data::Dumper;
alien_diag 'Alien::SWIProlog';
alien_ok 'Alien::SWIProlog';
my $prop = Alien::SWIProlog->runtime_prop;
my $prefix = path( $prop->{prefix} );
my $distdir = path( $prop->{distdir} );
sub _convert {
my $p = path($_[0]);
if( Alien::SWIProlog->install_type('share') ) {
if( $dlfile ) {
note "dlfile: $dlfile";
DynaLoader::dl_load_file($dlfile);
} else {
note "dlfile: not found";
}
require Alien::SWIProlog::Util;
my $PLVARS = Alien::SWIProlog::Util::get_plvars($prop->{'swipl-bin'});
{
local $Data::Dumper::Terse = 1;
local $Data::Dumper::Sortkeys = 1;
note Dumper( $PLVARS );
}
my $xs = do { local $/; <DATA> };
xs_ok { xs => $xs, verbose => 1 }, with_subtest {
my($module) = @_;
ok $module->init, 'Initialises SWI-Prolog';
};
done_testing;
( run in 0.256 second using v1.01-cache-2.11-cpan-4d50c553e7e )