exodist / child-socket Goto Github PK
View Code? Open in Web Editor NEWChild with socket support.
Child with socket support.
NAME Child::Socket - Socket based IPC plugin for Child DESCRIPTION Lets you create a Child object, disconnect from it, and reconnect later in the same or different process. REQUIREMENT NOTE Requires UNIX socket support. SYNOPSIS use Child qw/child/; # Build with Socket IPC my $proc = child { my $parent = shift; $parent->say("message1"); my $reply = $parent->read(); } socket => 1; my $message1 = $proc->read(); $proc->say("reply"); DISCONNECTING AND RECONNECTING sript1.pl: #!/usr/bin/perl; use Child qw/child/; $proc = child { my $parent = shift; # detach will remove the child from the parents process group. $parent->detach; $parent->disconnect; # $parent->connect accepts a client connection # argument is timeout in seconds $parent->connect(10); $parent->say( "Hi" ); } socket => '/tmp/my-socket'; $proc->disconnect; script2.pl: #!/usr/bin/perl; use Child qw/proc_connect/; my $proc = proc_connect( '/tmp/my-socket' ); my $msg = $proc->read; # "Hi\n" AUTHORS Chad Granum [email protected] COPYRIGHT Copyright (C) 2010 Chad Granum Child-Socket is free software; Standard perl licence. Child-Socket is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
Sample fail report:
http://www.cpantesters.org/cpan/report/7661288e-1de7-11e3-a00f-1fcd7e66b2dc
For some reason the call IO::Socket::UNIX->new in https://metacpan.org/source/EXODIST/Child-Socket-0.002/lib/Child/Link/IPC/Socket/Proc.pm#L41 fails and croak is called but because it is not imported it cannot be called.
HTH && Thanks,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.