diff options
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | Changes | 9 | ||||
-rw-r--r-- | lib/Reply/Plugin/Defaults.pm | 1 | ||||
-rw-r--r-- | lib/Reply/Plugin/ReadLine.pm | 3 |
4 files changed, 14 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml index e649e7e..91e0385 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,11 @@ +sudo: false language: perl perl: + - "5.22" - "5.20" - "5.18" - "5.16" - "5.14" - - "5.12" - - "5.10" install: - cpanm -q --notest Dist::Zilla || (cat /home/travis/.cpanm/build.log; false) - dzil authordeps --missing | cpanm -q --notest || (cat /home/travis/.cpanm/build.log; false) @@ -2,6 +2,15 @@ Revision history for Reply {{$NEXT}} +0.40 2016-06-25 + - fix docs (y, #49) + +0.39 2016-05-29 + - allow ~/ in the history_file option to ReadLine (y, #48) + +0.38 2015-12-02 + - fix running reply without the Package plugin (2shortplanks, #45) + 0.37 2014-11-18 - internal refactoring for extensibility (sergeyromanov, #41) diff --git a/lib/Reply/Plugin/Defaults.pm b/lib/Reply/Plugin/Defaults.pm index e7874e3..bbe5934 100644 --- a/lib/Reply/Plugin/Defaults.pm +++ b/lib/Reply/Plugin/Defaults.pm @@ -48,6 +48,7 @@ sub compile { my $env = { map { %$_ } $self->publish('lexical_environment') }; my $package = ($self->publish('package'))[-1]; + $package = 'main' unless defined $package; my $prefix = "package $package;\n$PREFIX"; diff --git a/lib/Reply/Plugin/ReadLine.pm b/lib/Reply/Plugin/ReadLine.pm index 55baa38..5cced70 100644 --- a/lib/Reply/Plugin/ReadLine.pm +++ b/lib/Reply/Plugin/ReadLine.pm @@ -14,7 +14,7 @@ use Term::ReadLine; ; .replyrc [ReadLine] - history_file = '.hist' + history_file = .hist history_length = 100 =head1 DESCRIPTION @@ -40,6 +40,7 @@ sub new { my $self = $class->SUPER::new(@_); $self->{term} = Term::ReadLine->new('Reply'); my $history = $opts{history_file} || '.reply_history'; + $history =~ s{^~/}{$ENV{HOME}/}; $self->{history_file} = File::Spec->catfile( (File::Spec->file_name_is_absolute($history) ? () |