From bf2ce0d57688f09e9caad21020de9d797c61a053 Mon Sep 17 00:00:00 2001 From: Ryan Voots Date: Sun, 28 May 2017 17:10:42 -0400 Subject: [PATCH] woo --- cpanfile | 4 ++++ plugins/{eval.pm => eval.pm.old} | 0 plugins/supereval.pm | 10 +++++----- 3 files changed, 9 insertions(+), 5 deletions(-) rename plugins/{eval.pm => eval.pm.old} (100%) diff --git a/cpanfile b/cpanfile index ea72306..63e63db 100644 --- a/cpanfile +++ b/cpanfile @@ -99,3 +99,7 @@ requires 'Types::Standard' => 0; requires 'Perl::Tidy' => 0; requires 'File::Temp' => 0; requires 'Permute::Named::Iter' => 0; +requires 'Marpa::R2' => 0; +requires 'Syntax::Keyword::Try' => 0; +requires 'File::Open' => 0; +requires 'App::EvalServerAdvanced' => 0; diff --git a/plugins/eval.pm b/plugins/eval.pm.old similarity index 100% rename from plugins/eval.pm rename to plugins/eval.pm.old diff --git a/plugins/supereval.pm b/plugins/supereval.pm index 81aa3ff..374b261 100644 --- a/plugins/supereval.pm +++ b/plugins/supereval.pm @@ -16,14 +16,14 @@ sub new { my( $class ) = @_; my $self = bless {}, $class; - $self->{name} = 'supereval'; + $self->{name} = 'eval'; $self->{opts} = { command => 1, }; - my @perl_aliases = map {("Xeval$_", "wXeval$_", "sXeval$_", "wsXeval$_", "swXeval$_")} @versions; + my @perl_aliases = map {("eval$_", "weval$_", "seval$_", "wseval$_", "sweval$_")} @versions; - $self->{aliases} = [ qw/Xpleval Xperleval Xdeparse/, @perl_aliases ]; + $self->{aliases} = [ qw/jseval jeval phpeval pleval perleval deparse k20eval rbeval pyeval luaeval/, @perl_aliases ]; $self->{dbh} = DBI->connect("dbi:SQLite:dbname=var/evallogs.db"); return $self; @@ -36,7 +36,7 @@ sub command { my $command = $said->{command_match}; my $type = $said->{command_match}; - $type =~ s/^\s*(\w+?)?Xeval(.*)?/$1$2/; + $type =~ s/^\s*(\w+?)?eval(.*)?/$1$2/; warn "Initial type: $type\n"; my %translations = ( @@ -65,7 +65,7 @@ sub command { if( not $type ) { $type = 'perl'; } warn "Found $type: $code"; - if ($command =~ /^([ws]+)?Xeval/i) { + if ($command =~ /^([ws]+)?eval/i) { my $c=$1; $code = "use warnings; ".$code if ($c =~ /w/); $code = "use strict; ".$code if ($c =~ /s/);