X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FPlugin%2FPeek.pm;h=8e772eec7676edce4608f0b59bffcd1954960031;hp=e6f48935bbf24feca9782c7950ee1510cadc8943;hb=213b6e768d5a81a0c9e37eabde0d5d352b49db72;hpb=1c4d0148a1b0121cdfee1f3bd97631289a524d09 diff --git a/lib/Devel/REPL/Plugin/Peek.pm b/lib/Devel/REPL/Plugin/Peek.pm index e6f4893..8e772ee 100644 --- a/lib/Devel/REPL/Plugin/Peek.pm +++ b/lib/Devel/REPL/Plugin/Peek.pm @@ -12,15 +12,16 @@ with qw(Devel::REPL::Plugin::Turtles); sub expr_command_peek { my ( $self, $eval, $code ) = @_; - if ( my $cont = $self->can("continue_reading_if_necessary") ) { - $code = $self->$cont($code); + my @res = $self->eval($code); + + if ( $self->is_error(@res) ) { + return $self->format(@res); + } else { + # can't override output properly + # FIXME do some dup wizardry + Dump(@res); + return ""; # this is a hack to print nothing after Dump has already printed. PLZ TO FIX KTHX! } - - # can't override output properly - # FIXME do some dup wizardry - Dump( $self->eval($code) ); - - return ""; # this is a hack to print nothing after Dump has already printed. PLZ TO FIX KTHX! } __PACKAGE__