From b4ef3b5197c446d77aa7ce52490bcb7236746401 Mon Sep 17 00:00:00 2001 From: Ryan Voots Date: Sat, 1 Oct 2016 18:47:51 -0400 Subject: [PATCH] Setup more modules in eval --- cpanfile | 1 + lib/EvalServer.pm | 4 ++-- lib/eval.pl | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cpanfile b/cpanfile index cf38e3b..357d31b 100644 --- a/cpanfile +++ b/cpanfile @@ -67,3 +67,4 @@ requires 'Math::BigFloat' => 0; requires 'Math::BigRat' => 0; requires 'indirect' => 0; requires 'Moo' => 0; +requires 'autovivification' => 0; diff --git a/lib/EvalServer.pm b/lib/EvalServer.pm index bd60c55..34fea3a 100644 --- a/lib/EvalServer.pm +++ b/lib/EvalServer.pm @@ -61,8 +61,8 @@ warn "Spawning Eval: $args->{code}\n"; $wheel->put( $args->{code} ); - warn "Adding delay for 12 seconds: ", $wheel->ID; - $kernel->delay_set( timeout => 12, $wheel->ID ); + warn "Adding delay for 30 seconds: ", $wheel->ID; + $kernel->delay_set( timeout => 30, $wheel->ID ); } sub timeout { diff --git a/lib/eval.pl b/lib/eval.pl index 1c6a881..bf79335 100755 --- a/lib/eval.pl +++ b/lib/eval.pl @@ -167,7 +167,7 @@ use Storable qw/nfreeze/; nfreeze([]); #Preload Nfreeze since it's loaded on dem my $code = do { local $/; }; # Kill @INC to shorten errors; - @INC = (); + @INC = ('.'); # Close every other filehandle we may have open # this is probably legacy code at this point since it was used @@ -299,7 +299,7 @@ use Storable qw/nfreeze/; nfreeze([]); #Preload Nfreeze since it's loaded on dem sub perl_code { my( $code ) = @_; local $@; - local @INC; + local @INC = ('.'); local $_;