my $sub = $self->compile($code, no_mangling => 1);
- open my $fh, ">", \my $out;
- {
- local *STDOUT = $fh;
- B::Concise::compile((split /\s+/, $opts), $sub)->();
+ if ( $self->is_error($sub) ) {
+ return $self->format($sub);
+ } else {
+ open my $fh, ">", \my $out;
+ {
+ local *STDOUT = $fh;
+ B::Concise::compile((split /\s+/, $opts), $sub)->();
+ }
+
+ return $out;
}
-
- return $out;
}
__PACKAGE__
sub expr_command_peek {
my ( $self, $eval, $code ) = @_;
- if ( my $cont = $self->can("continue_reading_if_necessary") ) {
- $code = $self->$cont($code);
- }
-
# can't override output properly
# FIXME do some dup wizardry
Dump( $self->eval($code) );