package Devel::REPL;
+# ABSTRACT: A modern perl interactive shell
+
+our $VERSION = '1.003030';
use Term::ReadLine;
use Moose;
use namespace::autoclean;
use 5.008001; # backwards compat, doesn't warn like 5.8.1
-our $VERSION = '1.003018';
-
with 'MooseX::Object::Pluggable';
use Devel::REPL::Error;
print $fh "\n" if $self->term->ReadLine =~ /Gnu/;
}
-=head1 NAME
+1;
+__END__
-Devel::REPL - a modern perl interactive shell
+=pod
=head1 SYNOPSIS
if you like, though.
If you followed the first example in the L</"SYNOPSIS"> above, you'll have the
-History and LexEnv plugins loaded (and there are many more available).
+L<History|Devel::REPL::Plugin::History> and L<LexEnv|Devel::REPL::Plugin::LexEnv>
+plugins loaded (and there are many more available).
Although the shell might support "up-arrow" history, the History plugin adds
"bang" history to that so you can re-execute chosen commands (with e.g.
C<!53>). The LexEnv plugin ensures that lexical variables declared with the
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
Perl module for distribution (perhaps via the CPAN). For more information on
this feature, please see the L<Devel::REPL::Profile> manual page.
-A default profile ships with C<Devel::REPL>; it loads the following plugins:
-
-=over 4
-
-=item *
-
-L<Devel::REPL::Plugin::History>
-
-=item *
-
-L<Devel::REPL::Plugin::LexEnv>
-
-=item *
-
-L<Devel::REPL::Plugin::DDS>
-
-=item *
-
-L<Devel::REPL::Plugin::Packages>
-
-=item *
-
-L<Devel::REPL::Plugin::Commands>
-
-=item *
-
-L<Devel::REPL::Plugin::MultiLine::PPI>
-
-=item *
-
-L<Devel::REPL::Plugin::Colors>
-
-=item *
-
-L<Devel::REPL::Plugin::Completion>
-
-=item *
-
-L<Devel::REPL::Plugin::CompletionDriver::INC>
-
-=item *
-
-L<Devel::REPL::Plugin::CompletionDriver::LexEnv>
-
-=item *
-
-L<Devel::REPL::Plugin::CompletionDriver::Keywords>
-
-=item *
-
-L<Devel::REPL::Plugin::CompletionDriver::Methods>
-
-=item *
-
-L<Devel::REPL::Plugin::ReadlineHistory>
-
-=back
+A C<Standard> profile ships with C<Devel::REPL>; it loads the following plugins
+(note that some of these require optional features -- or you can also use the
+C<Minimal> profile):
+
+=for :list
+* L<Devel::REPL::Plugin::History>
+* L<Devel::REPL::Plugin::LexEnv>
+* L<Devel::REPL::Plugin::DDS>
+* L<Devel::REPL::Plugin::Packages>
+* L<Devel::REPL::Plugin::Commands>
+* L<Devel::REPL::Plugin::MultiLine::PPI>
+* L<Devel::REPL::Plugin::Colors>
+* L<Devel::REPL::Plugin::Completion>
+* L<Devel::REPL::Plugin::CompletionDriver::INC>
+* L<Devel::REPL::Plugin::CompletionDriver::LexEnv>
+* L<Devel::REPL::Plugin::CompletionDriver::Keywords>
+* L<Devel::REPL::Plugin::CompletionDriver::Methods>
+* L<Devel::REPL::Plugin::ReadlineHistory>
=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<Devel::REPL> being based on the L<Moose> 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
A number of plugins ship with C<Devel::REPL>, and more are available on the
CPAN. Some of the shipped plugins are loaded in the default profile, mentioned
-above. These plugins can be loaded in your C<< $HOME/.re.pl/repl.rc >> like:
+above. These plugins can be loaded in your F< $HOME/.re.pl/repl.rc > like:
load_plugin qw( CompletionDriver::Global DumpHistory );
1
$_
-=head1 REQUIREMENTS
-
-In addition to the contents of the standard Perl distribution, you will need
-the following:
-
-=over 4
-
-=item *
-
-L<Moose> >= 0.74
-
-=item *
-
-L<MooseX::Object::Pluggable> >= 0.0009
-
-=item *
-
-L<MooseX::Getopt> >= 0.18
-
-=item *
-
-L<namespace::autoclean>
-
-=item *
-
-L<File::HomeDir>
-
-=item *
+=head1 OPTIONAL FEATURES
-L<Task::Weaken>
+In addition to the prerequisites declared in this distribution, which should be automatically installed by your L<CPAN> client, there are a number of optional features, used by
+additional plugins. You can install any of these features by installing this
+distribution interactively (e.g. C<cpanm --interactive Devel::REPL>).
-=item *
+=for comment I hope to automatically generate this data via a Pod::Weaver section
-L<B::Concise>
+=for :list
+* Completion plugin - extensible tab completion
+* DDS plugin - better format results with Data::Dump::Streamer
+* DDC plugin - even better format results with Data::Dumper::Concise
+* INC completion driver - tab complete module names in use and require
+* Interrupt plugin - traps SIGINT to kill long-running lines
+* Keywords completion driver - tab complete Perl keywords and operators
+* LexEnv plugin - variables declared with "my" persist between statements
+* MultiLine::PPI plugin - continue reading lines until all blocks are closed
+* Nopaste plugin - upload a session\'s input and output to a Pastebin
+* PPI plugin - PPI dumping of Perl code
+* Refresh plugin - automatically reload libraries with Module::Refresh
-=item *
+=head1 SEE ALSO
-L<Term::ANSIColor>
-
-=item *
-
-L<Devel::Peek>
-
-=back
-
-Optionally, some plugins if installed will require the following modules:
-
-=over 4
-
-=item *
-
-L<PPI>
-
-=item *
-
-L<Data::Dump::Streamer>
-
-=item *
-
-L<Data::Dumper::Concise>
-
-=item *
-
-L<File::Next>
-
-=item *
-
-L<Sys::SigAction>
-
-=item *
-
-L<B::Keywords>
-
-=item *
-
-L<Lexical::Persistence>
-
-=item *
-
-L<App::Nopaste>
-
-=item *
-
-L<Module::Refresh>
-
-=back
-
-=head1 AUTHOR
-
-Matt S Trout - mst (at) shadowcatsystems.co.uk (L<http://www.shadowcatsystems.co.uk/>)
-
-=head1 CONTRIBUTORS
-
-=over 4
-
-=item Stevan Little - stevan (at) iinteractive.com
-
-=item Alexis Sukrieh - sukria+perl (at) sukria.net
-
-=item epitaph
-
-=item mgrimes - mgrimes (at) cpan dot org
-
-=item Shawn M Moore - sartak (at) gmail.com
-
-=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
-
-=item Karen Etheridge C<< <ether@cpan.org> >>
-
-=back
-
-=head1 LICENSE
-
-This library is free software under the same terms as perl itself
+=for :list
+* L<A comparison of various REPLs|https://www.shadowcat.co.uk/blog/matt-s-trout/mstpan-17/>
=cut
-
-1;