Subject: | [PATCH] make B::Module::Info unbuffered |
If Module::Info::_call_B is to use 2>&1, then output from B::Module::Info
must be unbuffered, per the attached patch. Otherwise the "syntax OK"
may land within valid output, which then is grepped out or otherwise
rendered unusable.
Reproducible on one of my Linux boxes.
R
diff -c 'Module-Info-0.12/lib/B/Module/Info.pm' 'Module-Info-0.12_unbuffered/lib/B/Module/Info.pm'
Index: ./lib/B/Module/Info.pm
*** ./lib/B/Module/Info.pm Mon Oct 14 20:29:50 2002
--- ./lib/B/Module/Info.pm Mon Oct 14 20:26:21 2002
***************
*** 7,12 ****
--- 7,19 ----
opgrep all_roots);
@B::Utils::bad_stashes = qw(); # give us everything.
+ my $oldfh;
+ $oldfh = select STDERR;
+ $|=1;
+ select STDOUT;
+ $|=1;
+ select $oldfh;
+
sub state_change {
return opgrep {name => [qw(nextstate dbstate setstate)]}, @_
}