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

No more hack for perl4!

This commit is contained in:
Ryan Voots 2017-05-05 00:34:58 -04:00
parent 3337eac8ab
commit 8a9b334269

View file

@ -329,12 +329,12 @@ use Storable qw/nfreeze/; nfreeze([]); #Preload Nfreeze since it's loaded on dem
};
my $code;
if ($type ne 'perl4') { # Perl 4 has special needs. It rides on the short bus.
# if ($type ne 'perl4') { # Perl 4 has special needs. It rides on the short bus.
$code = do {local $/; <STDIN>};
# redirect STDIN to /dev/null, to avoid warnings in convoluted cases.
# we have to leave this open for perl4, so only do this for other systems
open STDIN, '<', '/dev/null' or die "Can't open /dev/null: $!";
}
# }
# print Dumper({type => $type, code => $code});
@ -533,11 +533,10 @@ Biqsip biqsip 'ugh chan ghitlh lursa' nuh bey' ngun petaq qeng soj tlhej waqboch
}
';
print STDERR "About to exec: ", $exec_map{'perl'.$version}{bin}, "\n";
unless ($version eq '4') {
exec($exec_map{'perl'.$version}{bin}, '-e', $wrapper) or die "Exec failed $!";
} else {
exec($exec_map{'perl'.$version}{bin}, '-'); # the code for perl4 is actually still in STDIN, if we try to -e it needs to write files
exec($exec_map{'perl'.$version}{bin}, '-e', $code); # the code for perl4 is actually still in STDIN, if we try to -e it needs to write files
}
}