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