From: oliver Date: Sat, 7 Feb 2009 17:07:03 +0000 (+0000) Subject: make ReadLineHistory history file location portable X-Git-Tag: v1.003015~70 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=commitdiff_plain;h=ef59b3d97bb334d0cb128efe7da8fbe5c28a021e make ReadLineHistory history file location portable bump version for release git-svn-id: http://dev.catalyst.perl.org/repos/bast/trunk/Devel-REPL@5423 bd8105ee-0ff8-0310-8827-fb3f25b6796d --- diff --git a/Changes b/Changes index 412e3b3..ed33426 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,6 @@ +1.3.3 + - make Nopaste attribute lazy + - make ReadLineHistory history file location portable 1.3.2 - make plugins be M::I features so dependencies are optional - resolve rt.cpan#42506 readdir might fail diff --git a/Makefile.PL b/Makefile.PL index 2752336..2ea7a6c 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -3,6 +3,7 @@ use warnings; use inc::Module::Install 0.76; name 'Devel-REPL'; +perl_version '5.008001'; all_from 'lib/Devel/REPL.pm'; install_script 'script/re.pl'; diff --git a/lib/Devel/REPL.pm b/lib/Devel/REPL.pm index 9989e8c..4561ce9 100644 --- a/lib/Devel/REPL.pm +++ b/lib/Devel/REPL.pm @@ -5,7 +5,7 @@ use Moose; use namespace::clean -except => [ 'meta' ]; use 5.008001; # backwards compat, doesn't warn like 5.8.1 -our $VERSION = '1.003002'; # 1.3.2 +our $VERSION = '1.003003'; # 1.3.3 with 'MooseX::Object::Pluggable'; diff --git a/lib/Devel/REPL/Plugin/ReadLineHistory.pm b/lib/Devel/REPL/Plugin/ReadLineHistory.pm index 1830395..619d203 100644 --- a/lib/Devel/REPL/Plugin/ReadLineHistory.pm +++ b/lib/Devel/REPL/Plugin/ReadLineHistory.pm @@ -6,9 +6,12 @@ package Devel::REPL::Plugin::ReadLineHistory; use Devel::REPL::Plugin; +use File::HomeDir; +use File::Spec; + +my $hist_file = $ENV{PERLREPL_HISTFILE} || + File::Spec->catfile(File::HomeDir->my_home, '.perlreplhist'); -my $hist_file=$ENV{PERLREPL_HISTFILE} || - (($ENV{HOME} || (getpwuid($<))[7]) . "/.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 # PERLREPL_HISTLEN