.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Reply 3pm" .TH Reply 3pm "2016-08-28" "perl v5.22.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Reply \- read, eval, print, loop, yay! .SH "VERSION" .IX Header "VERSION" version 0.42 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Reply; \& \& Reply\->new(config => "$ENV{HOME}/.replyrc")\->run; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\s-1NOTE:\s0 This is an early release, and implementation details of this module are still very much in flux. Feedback is welcome! .PP Reply is a lightweight, extensible \s-1REPL\s0 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. .SH "METHODS" .IX Header "METHODS" .SS "new(%opts)" .IX Subsection "new(%opts)" Creates a new Reply instance. Valid options are: .IP "config" 4 .IX Item "config" Name of a configuration file to load. This should contain INI-style configuration for plugins as described above. .IP "plugins" 4 .IX Item "plugins" An arrayref of additional plugins to load. .SS "run" .IX Subsection "run" Runs the repl. Will continue looping until the \f(CW\*(C`read_line\*(C'\fR callback returns undef (typically when the user presses \f(CW\*(C`Ctrl+D\*(C'\fR), or the \f(CW\*(C`loop\*(C'\fR callback returns false (by default, the \f(CW\*(C`#q\*(C'\fR command quits the repl in this way). .ie n .SS "step($line, $verbose)" .el .SS "step($line, \f(CW$verbose\fP)" .IX Subsection "step($line, $verbose)" Runs a single iteration of the repl. If \f(CW$line\fR is given, it will be used as the string to evaluate (and the \f(CW\*(C`prompt\*(C'\fR and \f(CW\*(C`read_line\*(C'\fR callbacks will not be called). If \f(CW$verbose\fR is true, the prompt and line will be displayed as though they were typed. Returns true if the repl can continue, and false if it was requested to quit. .SH "CONFIGURATION" .IX Header "CONFIGURATION" 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). .PP 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. .IP "script_file" 4 .IX Item "script_file" This contains a filename whose contents will be evaluated as perl code once the configuration is done being loaded. .IP "script_line<\fIn\fR>" 4 .IX Item "script_line" Any options that start with \f(CW\*(C`script_line\*(C'\fR will be sorted by their key and then each value will be evaluated individually once the configuration is done being loaded. .Sp \&\s-1NOTE:\s0 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 \f(CW\*(C`script_line\*(C'\fR multiple times. .SH "BUGS" .IX Header "BUGS" No known bugs. .PP Please report any bugs to GitHub Issues at . .SH "SEE ALSO" .IX Header "SEE ALSO" Devel::REPL .SH "SUPPORT" .IX Header "SUPPORT" You can find this documentation for this module with the perldoc command. .PP .Vb 1 \& perldoc Reply .Ve .PP You can also look for information at: .IP "\(bu" 4 MetaCPAN .Sp .IP "\(bu" 4 Github .Sp .IP "\(bu" 4 \&\s-1RT: CPAN\s0's request tracker .Sp .IP "\(bu" 4 \&\s-1CPAN\s0 Ratings .Sp .SH "AUTHOR" .IX Header "AUTHOR" Jesse Luehrs .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is Copyright (c) 2016 by Jesse Luehrs. .PP This is free software, licensed under: .PP .Vb 1 \& The MIT (X11) License .Ve