in reply to Not Catching Signals While Program is Prompting with IO::Prompt
Probably because like some many overspecified CPAN modules, IO::Prompt throws everything including the kitchen sink at solving what are essentially simple problems, without considering the knock-on affects upon the callers code.
In this case, the kitchen sink is Term::Readkey and ReadMode 'raw', $IN;.
It compounds that by taking the unilateral decision to terminate the calling process if the user type ^C:
local $SIG{INT} = sub { ReadMode 'restore', $IN; exit };
|
|---|