X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FPlugin%2FReadLineHistory.pm;h=9cb893d9034025568f069393b0d62fec05f8eebb;hb=0b5d24302fd762cbe7a44c17ded49158ee5697da;hp=6a50e7fe49b687a1196bcd7e36aab265041f021b;hpb=8d5343b5f1fb9e3b33d1d36e96aabc94e29a822b;p=p5sagit%2FDevel-REPL.git diff --git a/lib/Devel/REPL/Plugin/ReadLineHistory.pm b/lib/Devel/REPL/Plugin/ReadLineHistory.pm index 6a50e7f..9cb893d 100644 --- a/lib/Devel/REPL/Plugin/ReadLineHistory.pm +++ b/lib/Devel/REPL/Plugin/ReadLineHistory.pm @@ -6,13 +6,16 @@ use strict; use warnings; package Devel::REPL::Plugin::ReadLineHistory; +# ABSTRACT: Integrate history with the facilities provided by L + +our $VERSION = '1.003029'; use Devel::REPL::Plugin; -use File::HomeDir; use File::Spec; +use namespace::autoclean; my $hist_file = $ENV{PERLREPL_HISTFILE} || - File::Spec->catfile(File::HomeDir->my_home, '.perlreplhist'); + File::Spec->catfile(($^O eq 'MSWin32' && "$]" < 5.016 ? $ENV{HOME} || $ENV{USERPROFILE} : (<~>)[0]), '.perlreplhist'); # HISTLEN should probably be in a config file to stop people accidentally # truncating their history if they start the program and forget to set @@ -70,9 +73,7 @@ around 'run' => sub { __END__ -=head1 NAME - -Devel::REPL::Plugin::ReadLineHistory - Integrate history with the facilities provided by L +=pod =head1 DESCRIPTION @@ -109,4 +110,3 @@ L> consistent for expansion wi L support or L. =cut -