NAME

Alien::CLIPS - Find or build CLIPS using Alien::Build

SYNOPSIS

use Alien::CLIPS;

# Directories / libraries that Alien::CLIPS can discover
my @bin_dirs = Alien::CLIPS->bin_dir;
my @libs     = Alien::CLIPS->dynamic_libs;

print "CLIPS binary dir: @bin_dirs\n";
print "CLIPS library:    @libs\n";

DESCRIPTION

Alien::CLIPS is the companion Alien module for Inline::CLIPS. Its job is to tell Perl where the CLIPS executable and shared library live. When the full Alien::Build infrastructure is available, this module prefers a system CLIPS installation and can fall back to building CLIPS from the FuzzyCLIPS source repository.

Even without Alien::Build, the module provides a small standalone implementation that reads environment variables so that a CLIPS installation can be located without rebuilding it.

DISCOVERY ORDER

Executable (bin_dir)

The binary directory is resolved from, in order:

  1. INLINE_CLIPS_BIN

  2. ALIEN_CLIPS_BIN

  3. Alien::Base system probe results (when Alien::Build is active)

The actual clips binary is expected to be inside this directory.

Library (dynamic_libs)

The shared library path is resolved from, in order:

  1. INLINE_CLIPS_LIB

  2. ALIEN_CLIPS_LIB

  3. Alien::Base probe results (when Alien::Build is active)

INSTALLATION

Using a system CLIPS

If CLIPS is already installed, make sure the clips binary is on $PATH, or set one of the environment variables below. No build step is required.

Building CLIPS from source

When no system CLIPS is found and Alien::Build is active, the Alien build will fetch and build CLIPS from:

L<https://github.com/jtrujil43/FuzzyCLIPS>

This is normally triggered automatically when you install this distribution with a CPAN client:

cpanm Inline::CLIPS

Manual environment-based configuration

You can point both Inline::CLIPS and Alien::CLIPS at a custom CLIPS installation without rebuilding anything:

export INLINE_CLIPS_EXECUTABLE=/opt/clips/6.4.2/clips
export INLINE_CLIPS_BIN=/opt/clips/6.4.2/bin
export INLINE_CLIPS_LIB=/opt/clips/6.4.2/lib/libclips.so

If only the Alien::CLIPS form is needed, use the ALIEN_ prefixes:

export ALIEN_CLIPS_BIN=/opt/clips/6.4.2/bin
export ALIEN_CLIPS_LIB=/opt/clips/6.4.2/lib/libclips.so

METHODS

bin_dir

Returns the list of directories that may contain the CLIPS binary. In the standalone fallback this is either the INLINE_CLIPS_BIN directory or the ALIEN_CLIPS_BIN directory, whichever is set.

dynamic_libs

Returns the list of CLIPS shared library paths. In the standalone fallback this is either the INLINE_CLIPS_LIB file or the ALIEN_CLIPS_LIB file, whichever is set.

SEE ALSO

Inline::CLIPS

The Perl module that uses Alien::CLIPS to locate CLIPS.

CLIPS home page

https://www.clipsrules.net/

FuzzyCLIPS source

https://github.com/jtrujil43/FuzzyCLIPS

AUTHOR

Inline-CLIPS contributors.

LICENSE

This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.