[. I notice only one chat2 bug, NETaa14400. I propose that this email
be taken as a bug report entitled "upgrade chat2 to use Comm". ]
In working on a FMTEYEWTK on IPC (a new 10x better perlipc.pod, actually),
I came to the part about IPC::Open[23], and felt bad about explaining the
buffering issues. (I fixed a couple things in them too, including letting
you pass \*FOO). In doing so, I just for the heckuvit put together
corresponding examples using Comm.pl, and it worked like a charm.
require 'Comm.pl';
$ph = open_proc('cat -n');
for (1..10) {
print $ph "a line\n";
print "got back ", scalar <$ph>;
}
I strongly submit that Chat2 be pulled from the distribution and
replaced with a shiny new modulated and podified comm library.
I'm not sure though whether IPC::Comm is the optimal name for it.
What about IPC::Chat instead?
It may not work everywhere, but is certainly more versatile than
chat2, which nearly never works at all, and whose paradigm is
far too close to eval "asdf" for my tastes.
--tom
be taken as a bug report entitled "upgrade chat2 to use Comm". ]
In working on a FMTEYEWTK on IPC (a new 10x better perlipc.pod, actually),
I came to the part about IPC::Open[23], and felt bad about explaining the
buffering issues. (I fixed a couple things in them too, including letting
you pass \*FOO). In doing so, I just for the heckuvit put together
corresponding examples using Comm.pl, and it worked like a charm.
require 'Comm.pl';
$ph = open_proc('cat -n');
for (1..10) {
print $ph "a line\n";
print "got back ", scalar <$ph>;
}
I strongly submit that Chat2 be pulled from the distribution and
replaced with a shiny new modulated and podified comm library.
I'm not sure though whether IPC::Comm is the optimal name for it.
What about IPC::Chat instead?
It may not work everywhere, but is certainly more versatile than
chat2, which nearly never works at all, and whose paradigm is
far too close to eval "asdf" for my tastes.
--tom