Perinci::Access::Simple::Server::Pipe - (Base) class for creating Riap::Simple server over pipe
This document describes version 0.290 of Perinci::Access::Simple::Server::Pipe (from Perl distribution Perinci-Access-Simple-Server), released on 2021-08-01.
In /path/to/your/program:
/path/to/your/program
#!/usr/bin/perl package MyRiapServer; use Moo; extends 'Perinci::Access::Simple::Server::Pipe'; # override some methods ... package main; MyRiapServer->run;
Accessing the server via Perinci::Access:
% perl -MPerinci::Access -e'my $pa = Perinci::Access->new; my $res = $pa->request(call => "riap+pipe:/path/to/your/prog////Foo/func");
This module is a class for creating Riap::Simple server over pipe. Riap requests will be read from STDIN, and response sent to STDOUT.
By default, the handle() method processes the Riap request using Perinci::Access::Schemeless. You can customize this by overriding the method. The Riap request is in req. Method should set res to the Riap response.
req
res
The current Riap request.
The current Riap response.
The main method. Will start a loop of reading request from STDIN and sending response to STDOUT. Riap request will be put to req attribute.
The method that will be called by run() to set res attribute. By default it will pass the request to Perinci::Access::Schemeless. You can override this method to provide custom behavior.
The method that sends res to client (STDOUT).
Please visit the project's homepage at https://metacpan.org/release/Perinci-Access-Simple-Server.
Source repository is at https://github.com/perlancar/perl-Perinci-Access-Simple-Server.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Perinci-Access-Simple-Server
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Riap::Simple, Riap, Rinci
Perinci::Access::Simple::Server::Socket.
perlancar <perlancar@cpan.org>
This software is copyright (c) 2021, 2020, 2017, 2015, 2014, 2013, 2012 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Perinci::Access::Simple::Server, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perinci::Access::Simple::Server
CPAN shell
perl -MCPAN -e shell install Perinci::Access::Simple::Server
For more information on module installation, please visit the detailed CPAN module installation guide.