From: matthewt Date: Mon, 16 Apr 2007 02:05:34 +0000 (+0000) Subject: Moved execute to $REPL X-Git-Tag: v1.003015~173 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ac5ce6317473fc5d2f0823d812465504b009298f;p=p5sagit%2FDevel-REPL.git Moved execute to $REPL git-svn-id: http://dev.catalyst.perl.org/repos/bast/trunk/Devel-REPL@3195 bd8105ee-0ff8-0310-8827-fb3f25b6796d --- diff --git a/lib/Devel/REPL.pm b/lib/Devel/REPL.pm index 89c3a8b..ff461f5 100644 --- a/lib/Devel/REPL.pm +++ b/lib/Devel/REPL.pm @@ -68,9 +68,9 @@ sub mangle_line { } sub execute { - my ($self, $to_exec, @args) = @_; - my @ret = eval { $to_exec->(@args) }; - return $self->error_return("Runtime error", $@) if $@; + my $REPL = shift; + my @ret = eval { shift->(@_) }; + return $REPL->error_return("Runtime error", $@) if $@; return @ret; }