X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FPlugin%2FReadLineHistory.pm;fp=lib%2FDevel%2FREPL%2FPlugin%2FReadLineHistory.pm;h=9cb893d9034025568f069393b0d62fec05f8eebb;hp=6e2bf946208035abdc4289c2677d5f0f48281203;hb=0b5d24302fd762cbe7a44c17ded49158ee5697da;hpb=f20faac8f95794ffd6ea066e936b9aa7c51a6ce8 diff --git a/lib/Devel/REPL/Plugin/ReadLineHistory.pm b/lib/Devel/REPL/Plugin/ReadLineHistory.pm index 6e2bf94..9cb893d 100644 --- a/lib/Devel/REPL/Plugin/ReadLineHistory.pm +++ b/lib/Devel/REPL/Plugin/ReadLineHistory.pm @@ -11,12 +11,11 @@ package Devel::REPL::Plugin::ReadLineHistory; 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