in reply to IO::Prompt warning
The problem is that a next unless defined has to be added in the _get_prompt routine at this point (line 91):
The for loop removes arguments supplied to prompt by undef-ing them in the array @data, but the index $i still only advances by one. When an option with an argument is encountered, both the option switch and the argument are undef-ed, but the loop will still inspect the position occupied by the option's argument.for (my $i = 0 ; $i < @data ; $i++) { local *_ = \($data[$i]); + next unless defined; if (ref eq 'HASH') { splice @data, $i + 1, 0, %$_; }
|
|---|