X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=blobdiff_plain;f=lib%2FDevel%2FREPL.pm;h=9b16f543f264184f161892217ee81952594d423c;hp=2e698910feb81d99438a578ae9d735e81b25ed60;hb=0e0d2539048eade7dfa30fff6f1ad5b7e90bbf70;hpb=f47911153306db973583f228e32de560907c943b diff --git a/lib/Devel/REPL.pm b/lib/Devel/REPL.pm index 2e69891..9b16f54 100644 --- a/lib/Devel/REPL.pm +++ b/lib/Devel/REPL.pm @@ -2,32 +2,32 @@ package Devel::REPL; use Term::ReadLine; use Moose; -use namespace::clean -except => [ 'meta' ]; +use namespace::autoclean; use 5.008001; # backwards compat, doesn't warn like 5.8.1 -our $VERSION = '1.003013'; - with 'MooseX::Object::Pluggable'; use Devel::REPL::Error; has 'term' => ( - is => 'rw', required => 1, + is => 'rw', + lazy => 1, default => sub { Term::ReadLine->new('Perl REPL') } ); has 'prompt' => ( - is => 'rw', required => 1, + is => 'rw', default => sub { '$ ' } ); has 'out_fh' => ( - is => 'rw', required => 1, lazy => 1, + is => 'rw', + lazy => 1, default => sub { shift->term->OUT || \*STDOUT; } ); has 'exit_repl' => ( - is => 'rw', required => 1, + is => 'rw', default => sub { 0 } ); @@ -245,7 +245,7 @@ filename like so: system$ re.pl --rcfile myproject.pc -If the filename happens to contain a forwardslash, then it's used absolutely, +If the filename happens to contain a forward slash, then it's used absolutely, or realive to the current working directory: system$ re.pl --rcfile /path/to/my/project/repl.rc @@ -319,7 +319,7 @@ L =head2 Plugins -Plugins are a way to add funcionality to the REPL shell, and take advantage of +Plugins are a way to add functionality to the REPL shell, and take advantage of C being based on the L object system for Perl 5. This means it's simple to 'hook into' many steps of the R-E-P-L process. Plugins can change the way commands are interpreted, or the way their results are @@ -374,11 +374,7 @@ L >= 0.18 =item * -L >= 0.16 - -=item * - -L +L =item * @@ -472,6 +468,8 @@ Matt S Trout - mst (at) shadowcatsystems.co.uk (L >> + =back =head1 LICENSE