Changeset 3698 for lang/perl/Archer
- Timestamp:
- 12/28/07 11:23:39 (11 months ago)
- Files:
-
- 1 modified
-
lang/perl/Archer/lib/Archer/Shell.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Archer/lib/Archer/Shell.pm
r3690 r3698 20 20 my $HISTSIZE = 256; 21 21 22 $term->stifle_history($HISTSIZE); 23 if (-f $HISTFILE) { 24 $term->ReadHistory($HISTFILE) or $self->{context}->log('warn' => "cannot read history file: $!"); 25 } 22 # this won't work with Term::ReadLine::Perl 23 # If there is Term::ReadLine::Gnu, be sure to do : export "PERL_RL=Gnu o=0" 24 eval { $term->stifle_history($HISTSIZE);}; 25 26 if (@!){ 27 $self->{context}->log('debug' => "You will need Term::ReadLine::Gnu"); 28 }else{ 29 if (-f $HISTFILE) { 30 $term->ReadHistory($HISTFILE) or $self->{context}->log('warn' => "cannot read history file: $!"); 31 } 32 } 26 33 27 34 while ( defined( my $line = $term->readline('archer> ') )) { … … 32 39 print "\n"; 33 40 34 $term->WriteHistory($HISTFILE) or $self->{context}->log('warn' => "perlsh: cannot write history file: $!"); 41 eval {$term->WriteHistory($HISTFILE);}; 42 if (@!){ 43 $self->{context}->log('debug' => "perlsh: cannot write history file: $!"); 44 } 45 35 46 } 36 47
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)