3 package Devel::REPL::Plugin::Refresh;
5 use Devel::REPL::Plugin;
6 use namespace::autoclean;
9 # before evaluating the code, ask Module::Refresh to refresh
10 # the modules that have changed
11 around 'eval' => sub {
13 my ($self, $line) = @_;
15 # first refresh the changed modules
16 Module::Refresh->refresh;
19 return $self->$orig($line);
28 Devel::REPL::Plugin::Refresh - reload libraries with Module::Refresh