1Reply(3)              User Contributed Perl Documentation             Reply(3)
2
3
4

NAME

6       Reply - read, eval, print, loop, yay!
7

VERSION

9       version 0.42
10

SYNOPSIS

12         use Reply;
13
14         Reply->new(config => "$ENV{HOME}/.replyrc")->run;
15

DESCRIPTION

17       NOTE: This is an early release, and implementation details of this
18       module are still very much in flux. Feedback is welcome!
19
20       Reply is a lightweight, extensible REPL for Perl. It is plugin-based
21       (see Reply::Plugin), and through plugins supports many advanced
22       features such as coloring and pretty printing, readline support, and
23       pluggable commands.
24

METHODS

26   new(%opts)
27       Creates a new Reply instance. Valid options are:
28
29       config
30           Name of a configuration file to load. This should contain INI-style
31           configuration for plugins as described above.
32
33       plugins
34           An arrayref of additional plugins to load.
35
36   run
37       Runs the repl. Will continue looping until the "read_line" callback
38       returns undef (typically when the user presses "Ctrl+D"), or the "loop"
39       callback returns false (by default, the "#q" command quits the repl in
40       this way).
41
42   step($line, $verbose)
43       Runs a single iteration of the repl. If $line is given, it will be used
44       as the string to evaluate (and the "prompt" and "read_line" callbacks
45       will not be called). If $verbose is true, the prompt and line will be
46       displayed as though they were typed. Returns true if the repl can
47       continue, and false if it was requested to quit.
48

CONFIGURATION

50       Configuration uses an INI-style format similar to the configuration
51       format of Dist::Zilla. Section names are used as the names of plugins,
52       and any options within a section are passed as arguments to that
53       plugin. Plugins are loaded in order as they are listed in the
54       configuration file, which can affect the results in some cases where
55       multiple plugins are hooking into a single callback (see Reply::Plugin
56       for more information).
57
58       In addition to plugin configuration, there are some additional options
59       recognized. These must be specified at the top of the file, before any
60       section headers.
61
62       script_file
63           This contains a filename whose contents will be evaluated as perl
64           code once the configuration is done being loaded.
65
66       script_line<n>
67           Any options that start with "script_line" will be sorted by their
68           key and then each value will be evaluated individually once the
69           configuration is done being loaded.
70
71           NOTE: this is currently a hack due to the fact that Config::INI
72           doesn't support multiple keys with the same name in a section. This
73           may be fixed in the future to just allow specifying "script_line"
74           multiple times.
75

BUGS

77       No known bugs.
78
79       Please report any bugs to GitHub Issues at
80       <https://github.com/doy/reply/issues>.
81

SEE ALSO

83       Devel::REPL
84

SUPPORT

86       You can find this documentation for this module with the perldoc
87       command.
88
89           perldoc Reply
90
91       You can also look for information at:
92
93       •   MetaCPAN
94
95           <https://metacpan.org/release/Reply>
96
97       •   Github
98
99           <https://github.com/doy/reply>
100
101       •   RT: CPAN's request tracker
102
103           <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Reply>
104
105       •   CPAN Ratings
106
107           <http://cpanratings.perl.org/d/Reply>
108

AUTHOR

110       Jesse Luehrs <doy@tozt.net>
111
113       This software is Copyright (c) 2016 by Jesse Luehrs.
114
115       This is free software, licensed under:
116
117         The MIT (X11) License
118
119
120
121perl v5.36.0                      2022-07-22                          Reply(3)
Impressum