3 package Devel::REPL::Plugin::Refresh;
4 # ABSTRACT: Reload libraries with Module::Refresh
6 our $VERSION = '1.003027';
8 use Devel::REPL::Plugin;
9 use namespace::autoclean;
12 # before evaluating the code, ask Module::Refresh to refresh
13 # the modules that have changed
14 around 'eval' => sub {
16 my ($self, $line) = @_;
18 # first refresh the changed modules
19 Module::Refresh->refresh;
22 return $self->$orig($line);