1 package Devel::REPL::Plugin::PermanentHistory;
4 use namespace::clean -except => [ 'meta' ];
8 has 'history_file' => ( is => 'rw' );
14 $self->history_file( $file );
16 return unless $self->history_file && -f $self->history_file;
20 read_file($self->history_file);
21 # print Dumper(\@history);
22 $self->history( \@history );
23 $self->term->addhistory($_) for @history;
26 before 'DESTROY' => sub {
29 return unless $self->history_file;
31 write_file $self->history_file,