Subject: | 5.14.0 feature: -C<x> in shebang lines |
I came across this when I released Dist-Zilla-Plugin-Test-Compile - t/13-shebang-dashes.t (which I added in that version) executes perl with a script containing the shebang "#!/usr/bin/perl -CS", which only became legal in 5.014.
Here is the regex I am using for extracting shebangs and flags:
$line =~ /^#!\s*(?:\S*perl\S*)((?:\s+-\w*)*)(?:\s*#.*)?$/;
my @flags = $1 ? split(' ', $1) : ();