The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

XAS::Lib::Pipe - Interact with named pipes

SYNOPSIS

 use XAS::Lib::Pipe;

 my $client = XAS::Lib::Pipe->new(
     -fifo   => File('/var/lib/xas/pipe'),
     -filter => POE::Filter::Line->new(),
     -eol    => "\n",
 );

 $server->run();

DESCRIPTION

The module provides a POE based framework for reading and writing to named pipes.

METHODS

new

This initializes the module and starts listening on the pipe. The following parametrs are used:

-alias

The name of the POE session.

-fifo

The name of the pipe to interact with.

-filter

An optional filter to use, defaults to POE::Filter::Line

-eol

An optional EOL, defaults to "\n";

process_request($input)

This method will process the input from the client. It takes the following parameters:

$input

The input received from the socket.

process_response($output)

This method will process the output from the client. It takes the following parameters:

$output

The output to be sent to the socket.

process_errors($error)

This method will process the error output from the client. It takes the following parameters:

$error

The output to be sent to the socket.

SEE ALSO

XAS

AUTHOR

Kevin L. Esteb, <kevin@kesteb.us>

COPYRIGHT AND LICENSE

Copyright (c) 2012-2016 Kevin L. Esteb

This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. For details, see the full text of the license at http://www.perlfoundation.org/artistic_license_2_0.