# Devel::REPL::Plugin::History around 'read' => sub { my $orig = shift; my ($self, @args) = @_; my $line = $self->$orig(@args); if (defined $line) { if ($line =~ m/^!(.*)$/) { my $call = $1; $line = $self->history_call($call); if (defined $line) { $self->print($line."\n"); } else { return "'Unable to find ${call} in history'"; } } if ($line =~ m/\S/) { $self->push_history($line); } } return $line; };