more Changes formatting fixes
[p5sagit/Devel-REPL.git] / lib / Devel / REPL / Plugin / Refresh.pm
CommitLineData
13e18b1b 1package Devel::REPL::Plugin::Refresh;
2
6a5409bc 3use Devel::REPL::Plugin;
aa8b7647 4use namespace::autoclean;
13e18b1b 5use Module::Refresh;
6
7# before evaluating the code, ask Module::Refresh to refresh
8# the modules that have changed
9around 'eval' => sub {
10 my $orig = shift;
11 my ($self, $line) = @_;
12
13 # first refresh the changed modules
14 Module::Refresh->refresh;
15
16 # the eval the code
17 return $self->$orig($line);
18};
19
201;
cfd1094b 21
22__END__
23
24=head1 NAME
25
26Devel::REPL::Plugin::Refresh - reload libraries with Module::Refresh
27
28=cut
29