The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

SWISH::Fork - Perl extension for accessing the SWISH-E search engine via a fork/exec.

SYNOPSIS

    use SWISH;

    $sh = SWISH->connect('Fork',
       prog     => '/usr/local/bin/swish-e',
       indexes  => 'index.swish-e',
       results  => sub { print $_[1]->as_string,"\n" },
    );

DESCRIPTION

This module is a driver for the SWISH search engine using the forked access method. Please see SWISH for usage instructions.

This module has been tested with the following versions of SWISH-E

    1.2.4
    1.3.2
    2.0.4
    2.1 (pre 2.2 development version)

NOTE: This module is now depreciated. Use the SWISH::API module instead. SWISH::API is bundled with Swish-e version 2.4.0, but will soon be available from the CPAN. SWISH::API is an xs interface to the Swish-e library.

REQUIRED MODULES

The following module is required (and needs to be installed before installing this module.

    SWISH - the front-end for module for accessing the SWISH search engine.

These modules are required, but are standard.

    Symbol - localized file handles (standard module)

    IO::Handle - For flushing buffers

This module is not required, but *should* be installed when running under mod_perl or any situation where a C signal handler must be restored. (Under mod_perl we need to restore Apache's SIGALRM handler.) The module will only be used if installed, otherwise will fall back to $SIG{ALRM}.

    Sys::Signal - Use instead of C<local $SIG{ALRM}> to restore signal handlers.
    Should be fixed in Perl 5.6.1, but check with the mod_perl list.

RUNNING UNDER Win32

This module will run under Windows, but uses a piped open to run Swish, and does not offer timeout support. In addition, parameters passed to swish are blindly untainted -- shell escapes are not removed. All parameters are placed in double-quotes when running under Win32. Please let me know if there's a better way under Win32.

It is recommended that the security issues of running CGI scripts under Windows be carefully considered.

AUTHOR

Bill Moseley -- moseley@hank.org

SEE ALSO

SWISH