mirror of
https://github.com/perlbot/perlbuut
synced 2025-06-08 02:15:40 -04:00
Revert "this'll be reverted to test things"
This reverts commit dfa2ec4d4e
.
This commit is contained in:
parent
582b6ffce5
commit
1d973c7c82
1 changed files with 5 additions and 8 deletions
13
lib/eval.pl
13
lib/eval.pl
|
@ -32,9 +32,9 @@ require "utf8_heavy.pl";
|
||||||
|
|
||||||
# save the old stdout, we're going to clobber it soon. STDOUT
|
# save the old stdout, we're going to clobber it soon. STDOUT
|
||||||
my $oldout;
|
my $oldout;
|
||||||
my $outbuffer = "";
|
my $outbuffer;
|
||||||
|
my $outputcode;
|
||||||
open($oldout, ">&STDOUT") or die "Can't dup STDOUT: $!";
|
open($oldout, ">&STDOUT") or die "Can't dup STDOUT: $!";
|
||||||
$oldout->print("penis\n");
|
|
||||||
|
|
||||||
no warnings;
|
no warnings;
|
||||||
|
|
||||||
|
@ -162,9 +162,7 @@ use Storable qw/nfreeze/; nfreeze([]); #Preload Nfreeze since it's loaded on dem
|
||||||
my $limit = 150 * $meg;
|
my $limit = 150 * $meg;
|
||||||
|
|
||||||
# clobber stdout before we set rlimits. otherwise we can't do anything STDOUT
|
# clobber stdout before we set rlimits. otherwise we can't do anything STDOUT
|
||||||
open(my $stdh, ">", \$outbuffer)
|
open(STDOUT, ">", \$outbuffer) or die "Can't dup to buffer: $!";
|
||||||
or die "Can't dup to buffer: $!";
|
|
||||||
*STDOUT = $stdh;
|
|
||||||
|
|
||||||
(
|
(
|
||||||
setrlimit(RLIMIT_VMEM, 1024*$meg, 1024*$meg)
|
setrlimit(RLIMIT_VMEM, 1024*$meg, 1024*$meg)
|
||||||
|
@ -234,8 +232,7 @@ use Storable qw/nfreeze/; nfreeze([]); #Preload Nfreeze since it's loaded on dem
|
||||||
j_code($code);
|
j_code($code);
|
||||||
}
|
}
|
||||||
|
|
||||||
*STDOUT = $oldout;
|
$oldout->print($outbuffer);
|
||||||
print($outbuffer);
|
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
@ -260,7 +257,7 @@ use Storable qw/nfreeze/; nfreeze([]); #Preload Nfreeze since it's loaded on dem
|
||||||
|
|
||||||
my $out = ref($ret) ? Dumper( $ret ) : "" . $ret;
|
my $out = ref($ret) ? Dumper( $ret ) : "" . $ret;
|
||||||
|
|
||||||
print $out; # unless $outbuffer;
|
print $out unless $outbuffer;
|
||||||
if( $@ ) { print "ERROR: $@" }
|
if( $@ ) { print "ERROR: $@" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue