Reply - read, eval, print, loop, yay!
version 0.32
use Reply; Reply->new(config => "$ENV{HOME}/.replyrc")->run;
NOTE: This is an early release, and implementation details of this module are still very much in flux. Feedback is welcome!
Reply is a lightweight, extensible REPL for Perl. It is plugin-based (see Reply::Plugin), and through plugins supports many advanced features such as coloring and pretty printing, readline support, and pluggable commands.
Creates a new Reply instance. Valid options are:
Name of a configuration file to load. This should contain INI-style configuration for plugins as described above.
An arrayref of additional plugins to load.
Runs the repl. Will continue looping until the read_line callback returns undef (typically when the user presses Ctrl+D), or the loop callback returns false (by default, the #q command quits the repl in this way).
read_line
Ctrl+D
loop
#q
Runs a single iteration of the repl. If $line is given, it will be used as the string to evaluate (and the prompt and read_line callbacks will not be called). Returns true if the repl can continue, and false if it was requested to quit.
$line
prompt
Configuration uses an INI-style format similar to the configuration format of Dist::Zilla. Section names are used as the names of plugins, and any options within a section are passed as arguments to that plugin. Plugins are loaded in order as they are listed in the configuration file, which can affect the results in some cases where multiple plugins are hooking into a single callback (see Reply::Plugin for more information).
In addition to plugin configuration, there are some additional options recognized. These must be specified at the top of the file, before any section headers.
This contains a filename whose contents will be evaluated as perl code once the configuration is done being loaded.
Any options that start with script_line will be sorted by their key and then each value will be evaluated individually once the configuration is done being loaded.
script_line
NOTE: this is currently a hack due to the fact that Config::INI doesn't support multiple keys with the same name in a section. This may be fixed in the future to just allow specifying script_line multiple times.
No known bugs.
Please report any bugs through RT: email bug-reply at rt.cpan.org, or browse to http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Reply.
bug-reply at rt.cpan.org
Devel::REPL
You can find this documentation for this module with the perldoc command.
perldoc Reply
You can also look for information at:
MetaCPAN
https://metacpan.org/release/Reply
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Reply
Github
https://github.com/doy/reply
CPAN Ratings
http://cpanratings.perl.org/d/Reply
Jesse Luehrs <doy@tozt.net>
This software is Copyright (c) 2013 by Jesse Luehrs.
This is free software, licensed under:
The MIT (X11) License
To install Reply, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Reply
CPAN shell
perl -MCPAN -e shell install Reply
For more information on module installation, please visit the detailed CPAN module installation guide.