increment $VERSION after 1.003027 release
[p5sagit/Devel-REPL.git] / lib / Devel / REPL / Plugin / Refresh.pm
1 use strict;
2 use warnings;
3 package Devel::REPL::Plugin::Refresh;
4 # ABSTRACT: Reload libraries with Module::Refresh
5
6 our $VERSION = '1.003028';
7
8 use Devel::REPL::Plugin;
9 use namespace::autoclean;
10 use Module::Refresh;
11
12 # before evaluating the code, ask Module::Refresh to refresh
13 # the modules that have changed
14 around 'eval' => sub {
15     my $orig = shift;
16     my ($self, $line) = @_;
17
18     # first refresh the changed modules
19     Module::Refresh->refresh;
20
21     # the eval the code
22     return $self->$orig($line);
23 };
24
25 1;