1
0
Fork 0
mirror of https://github.com/perlbot/perlbuut synced 2025-06-07 10:35:41 -04:00

Fix warningss for other perls

This commit is contained in:
Ryan Voots 2017-12-12 12:07:21 -05:00
parent b23cd769c1
commit 0a5546d01f

View file

@ -122,8 +122,8 @@ sub command {
my $c=$1;
my $v=$2;
my $all = $3;
$code = "use warnings; ".$code if ($c =~ /w/ && ($v>=6 || $all));
$code = '$^W=1;'.$code if ($c =~ /w/ && ($v < 6 && !$all));
$code = "use warnings; ".$code if ($c =~ /w/ && ($v>=6 || !defined $v || $all));
$code = '$^W=1;'.$code if ($c =~ /w/ && (defined $v && $v < 6 && !$all));
$code = "use strict; ".$code if ($c =~ /s/);
}