Subject: | -guarantee generates warning on empty input |
This is on perl 5, version 22, subversion 0 (v5.22.0) built for x86_64-linux. I also tested on various Perls from 5.18.x to 5.23.0. I also tested on Mac OS X, with similar issues. Interestingly, 5.22.0 on Solaris worked properly.
With the test program executed as: perl -MIO::Prompter -e'my $i=prompt(">",-guarantee => [1,2])'
I get this output when I hit enter at the prompt on Linux or OS X:
Show quoted text
> Argument "" isn't numeric in smart match at /home/jmaslak/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/IO/Prompter.pm line 941.
>
If I add "-integer => sub { $_ > 0 }", in addition to the guarantee, the problem goes away (you get the '(must be an integer)') addition to the prompt, which is fine in my case.