Update Changes and README
[p5sagit/Devel-REPL.git] / lib / Devel / REPL.pm
index 1c6c3ab..c46dcc6 100644 (file)
@@ -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.003004'; # 1.3.4
+our $VERSION = '1.003010_01';
 
 with 'MooseX::Object::Pluggable';
 
@@ -26,10 +26,16 @@ has 'out_fh' => (
   default => sub { shift->term->OUT || \*STDOUT; }
 );
 
+has 'exit_repl' => (
+  is => 'rw', required => 1,
+  default => sub { 0 }
+);
+
 sub run {
   my ($self) = @_;
   while ($self->run_once_safely) {
-    # keep looping
+    # keep looping unless we want to exit REPL
+    last if $self->exit_repl;
   }
 }
 
@@ -51,11 +57,11 @@ sub run_once {
   my ($self) = @_;
 
   my $line = $self->read;
-  return unless defined($line); # undefined value == EOF
+  return unless defined($line);     # undefined value == EOF
 
   my @ret = $self->formatted_eval($line);
 
-  $self->print(@ret);
+  $self->print(@ret) unless $self->exit_repl;
 
   return 1;
 }
@@ -180,8 +186,8 @@ message will be returned. Here are a few examples:
  1
  $_ nosuchfunction
  Compile error: Bareword "nosuchfunction" not allowed while "strict subs" in use at (eval 130) line 5.
-  
- $_ 
+
+ $_
 
 In the first example above you see the output of the command (C<Hello,
 world!>), if any, and then the return value of the statement (C<1>). Following
@@ -208,16 +214,20 @@ exported functions from that module are available for immediate use:
          (Do you need to predeclare carp?)
  Compile error: syntax error at (eval 129) line 5, near "carp "I'm dieeeing!\n""
  BEGIN not safe after errors--compilation aborted at (eval 129) line 5.
- $_ use Carp 
-  
+
+ $_ use Carp
+
  $_ carp "I'm dieeeing!\n"
  I'm dieeeing!
   at /usr/share/perl5/Lexical/Persistence.pm line 327
  1
- $_ 
+ $_
+
+To quit from the shell, hit C<Ctrl+D> or C<Ctrl+C>.
+
+  MSWin32 NOTE: control keys won't work if TERM=dumb
+  because readline functionality will be disabled.
 
-To quit from the shell, hit C<control+d> or C<control+c>.
 
 =head2 Run Control Files
 
@@ -322,7 +332,7 @@ the following:
 
 =item *
 
-L<Moose> >= 0.64
+L<Moose> >= 0.74
 
 =item *
 
@@ -330,11 +340,11 @@ L<MooseX::Object::Pluggable> >= 0.0009
 
 =item *
 
-L<MooseX::Getopt> >= 0.15
+L<MooseX::Getopt> >= 0.18
 
 =item *
 
-L<MooseX::AttributeHelpers> >= 0.14
+L<MooseX::AttributeHelpers> >= 0.16
 
 =item *
 
@@ -348,6 +358,18 @@ L<File::HomeDir>
 
 L<Task::Weaken>
 
+=item *
+
+L<B::Concise>
+
+=item *
+
+L<Term::ANSIColor>
+
+=item *
+
+L<Devel::Peek>
+
 =back
 
 Optionally, some plugins if installed will require the following modules:
@@ -364,10 +386,18 @@ L<Data::Dump::Streamer>
 
 =item *
 
+L<Data::Dumper::Concise>
+
+=item *
+
 L<File::Next>
 
 =item *
 
+L<Sys::SigAction>
+
+=item *
+
 L<B::Keywords>
 
 =item *
@@ -404,6 +434,14 @@ Matt S Trout - mst (at) shadowcatsystems.co.uk (L<http://www.shadowcatsystems.co
 
 =item Oliver Gorwits - oliver on irc.perl.org
 
+=item Andrew Moore - C<< <amoore@cpan.org> >>
+
+=item Norbert Buchmuller C<< <norbi@nix.hu> >>
+
+=item Dave Houston C<< <dhouston@cpan.org> >>
+
+=item Chris Marshall
+
 =back
 
 =head1 LICENSE