Read all supplied lines from STDIN, not just first one.
This commit is contained in:
@@ -26,3 +26,4 @@ verbose = 8
|
|||||||
[-Modules::RequireVersionVar]
|
[-Modules::RequireVersionVar]
|
||||||
[-CodeLayout::RequireTidyCode]
|
[-CodeLayout::RequireTidyCode]
|
||||||
[-TestingAndDebugging::RequireUseWarnings]
|
[-TestingAndDebugging::RequireUseWarnings]
|
||||||
|
[-ControlStructures::ProhibitDeepNests]
|
||||||
|
|||||||
@@ -229,11 +229,10 @@ sub add_events () {
|
|||||||
fh => \*STDIN,
|
fh => \*STDIN,
|
||||||
poll => 'r',
|
poll => 'r',
|
||||||
cb => sub {
|
cb => sub {
|
||||||
my $msg = <>;
|
while (my $msg = <>) {
|
||||||
|
|
||||||
unless ($STDIN_FIRST_LINE_DROPPED) {
|
unless ($STDIN_FIRST_LINE_DROPPED) {
|
||||||
$msg = <>;
|
|
||||||
$STDIN_FIRST_LINE_DROPPED = 1;
|
$STDIN_FIRST_LINE_DROPPED = 1;
|
||||||
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($msg) {
|
if ($msg) {
|
||||||
@@ -277,6 +276,7 @@ sub add_events () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
# poll caps lock status, on one of my laptop there is no led for this :(
|
# poll caps lock status, on one of my laptop there is no led for this :(
|
||||||
|
|||||||
Reference in New Issue
Block a user