Today, I just want to study Perl script, but I may find a regressive bug with perl 5.22.1 version on Ubuntu16.04 x64. When I writen a script in perl and test 'given' method, I run this script and show some surplus message.
Test 'given' function:
#!/usr/bin/perl
use 5.22.1;
given($ARGV[0]){
when ('Fred') { print "Name is Fred.\n"}
when (/fred/i) { print "Name has fred in it.\n"}
when (/\AFred/) { print "Name starts with Fred.\n"}
default { print "I don't see a fred.\n"}
}
Result:
~# perl5.22.1 perl_given.pl fred
given is experimental at perl_given.pl line 3.
when is experimental at perl_given.pl line 4.
when is experimental at perl_given.pl line 5.
when is experimental at perl_given.pl line 6.
Name has fred in it.
I don't know, why does it show these surplus message? I search some information about it and find a url:https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=710063. So I think it may be a regressive bug, how do you think?
If you have an another idea, please let me know.