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