| 1 | package Child::IPC::Pipely; | ||
| 2 | |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 1 | our $VERSION = '0.01'; | |
| 7 | 1 | $VERSION = eval $VERSION; | |
| 8 | |||
| 9 | 1 | ▶ | use base 'Child::IPC::Pipe'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 1 | ▶ | use IO::Pipely qw/pipely/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | 1 | ▶ | sub shared_data { |
|
Subroutine
shared_data: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 14 | 1 | my ( $ain, $aout ) = pipely; | |
| 15 | 1 | my ( $bin, $bout ) = pipely; | |
| 16 | return [ | ||
| 17 | 1 | [ $ain, $aout ], | |
| 18 | [ $bin, $bout ], | ||
| 19 | ]; | ||
| 20 | } | ||
| 21 | |||
| 22 | 1 | 1; | |
| 23 | |||
| 24 | =head1 NAME | ||
| 25 | |||
| 26 | Child::IPC::Pipely - use Child with IO::Pipely for more portable IPC | ||
| 27 | |||
| 28 | =head1 SYNOPSIS | ||
| 29 | |||
| 30 | use Child; | ||
| 31 | my $child = Child->new( sub { ... }, pipely => 1 ); | ||
| 32 | |||
| 33 | =head1 DESCRIPTION | ||
| 34 | |||
| 35 | L<Child> is a great way to manage forking, but its default IPC uses C<pipe> which sadly isn't as portable as it could be in places. | ||
| 36 | L<IO::Pipely> provides a better solution (and indeed describes the problem better than I can). | ||
| 37 | Read more there. | ||
| 38 | |||
| 39 | =head1 SEE ALSO | ||
| 40 | |||
| 41 | =over | ||
| 42 | |||
| 43 | =item L<Child> | ||
| 44 | |||
| 45 | =item L<IO::Pipely> | ||
| 46 | |||
| 47 | =back | ||
| 48 | |||
| 49 | =head1 SOURCE REPOSITORY | ||
| 50 | |||
| 51 | L<http://github.com/jberger/Child-IPC-Pipely> | ||
| 52 | |||
| 53 | =head1 AUTHOR | ||
| 54 | |||
| 55 | Joel Berger, E<lt>joel.a.berger@gmail.comE<gt> | ||
| 56 | |||
| 57 | =head1 COPYRIGHT AND LICENSE | ||
| 58 | |||
| 59 | Copyright (C) 2013 by Joel Berger | ||
| 60 | |||
| 61 | This library is free software; you can redistribute it and/or modify | ||
| 62 | it under the same terms as Perl itself. | ||