From: Karen Etheridge Date: Wed, 16 Jul 2014 00:41:16 +0000 (-0700) Subject: tidy up pod, adding more markup X-Git-Tag: v1.003026~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8d5343b5f1fb9e3b33d1d36e96aabc94e29a822b;p=p5sagit%2FDevel-REPL.git tidy up pod, adding more markup --- diff --git a/lib/Devel/REPL.pm b/lib/Devel/REPL.pm index b844931..9cddd53 100644 --- a/lib/Devel/REPL.pm +++ b/lib/Devel/REPL.pm @@ -199,7 +199,8 @@ which means a single statement doesn't require the semicolon. You can add one if you like, though. If you followed the first example in the L above, you'll have the -History and LexEnv plugins loaded (and there are many more available). +L and L +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). The LexEnv plugin ensures that lexical variables declared with the @@ -329,7 +330,7 @@ output, or even add commands to the shell environment. A number of plugins ship with C, 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 ); diff --git a/lib/Devel/REPL/Overview.pod b/lib/Devel/REPL/Overview.pod index a71fd23..e6d2968 100644 --- a/lib/Devel/REPL/Overview.pod +++ b/lib/Devel/REPL/Overview.pod @@ -6,7 +6,7 @@ Devel::REPL::Overview - overview of Devel::REPL. =head2 What is a console? How it can assist you? - Most modern languages have consoles. Console is an interactive tool +Most modern languages have consoles. The console is an interactive tool that evaluates your input while you type it. It gives you several advantages: @@ -30,16 +30,13 @@ You can even call a console in your script and play around in script's context =back - For Ruby it would be irb, for Python is... python by itself and for perl... and there was nothing for perl (except that ugly perl -d -e "" and several -failed projects) until Devel::REPL was written by Matt S Trout (a.k.a. mst) +failed projects) until L was written by Matt S Trout (a.k.a. mst) from ShadowCatSystems L. - =head2 Devel::REPL - the Perl console - REPL stands for Read, Evaluate, Print, Loop. Lets install and try it. @@ -131,15 +128,15 @@ An example session: =head2 Control files a.k.a. I don't want to type it every time -Devel::REPL has control files feature. Control files are +L has a control files feature. Control files are evaluated on session start in the same way as you would -type them manually in console. +type them manually in the console. -Default control file is located at `$HOME/.re.pl/repl.rc` . +The default control file is located at F<$HOME/.re.pl/repl.rc>. You can store there any statements you would normally type in. -I.e. my `$HOME/.re.pl/repl.rc` has next lines: +I.e. my F<$HOME/.re.pl/repl.rc> has next lines: use feature 'say'; # to don't write \n all the time @@ -149,12 +146,12 @@ I.e. my `$HOME/.re.pl/repl.rc` has next lines: sub pp { print Data::Dumper->Dump([@_]) } You can have multiple control files and they can be anywhere in the -file system. To make re.pl use some rc-file other than repl.rc +file system. To make F use some rc-file other than F, call it like this: $ re.pl --rcfile /path/to/your/rc.file -If your rc-file is in `$HOME/.re.pl` directory, you can omit path: +If your rc-file is in F<$HOME/.re.pl> directory, you can omit the path: $ re.pl --rcfile rc.file @@ -172,32 +169,32 @@ Bundled plugins are: =item * -Devel::REPL::Plugin::History +L No comments. Simply history. =item * -Devel::REPL::Plugin::!LexEnv +L Provides a lexical environment for the Devel::REPL. =item * -Devel::REPL::Plugin::DDS +L Formats return values with Data::Dump::Streamer module. =item * -Devel::REPL::Plugin::Packages +L Keeps track of which package your're in. =item * -Devel::REPL::Plugin::Commands +L Generic command creation plugin using injected functions. =item * -Devel::REPL::Plugin::MultiLine::PPI +L Makes Devel::REPL read your input until your block is finished. What does this means: you can type a part of a block on one line and second part on another: @@ -216,17 +213,16 @@ Devel::REPL::Plugin::MultiLine::PPI but this *doesn't* mean you can print sub name or identifier on several lines. Don't do that! It won't work. - =back There are lots of contributed plugins you can find at CPAN. =head1 Profiles -If plugins change and extend functionality of Devel::REPL, profiles +If plugins change and extend functionality of L, profiles are changing your environment (loaded plugins, constants, subs and etc.). -For example, the Minimal profile, `Devel::REPL::Profile::Minimal`: +For example, the Minimal profile, L: package Devel::REPL::Profile::Minimal; @@ -252,10 +248,10 @@ For example, the Minimal profile, `Devel::REPL::Profile::Minimal`: 1; -There is also the 'Standard' profile, which contains a number of optional (yet +There is also the L profile, which contains a number of optional (yet very useful) features. -To enable some profile use --profile switch: +To enable some profile use the C<--profile> switch: $ re.pl --profile SomeProfile @@ -263,6 +259,22 @@ Alternatively, you can set the environment variable C to C, or set the C key in your C (see L for more information). -=head1 See Also +=head1 SEE ALSO + +=over 2 + +=item * + +L + +=item * + +L + +=item * + +L + +=back -L, L, L +=cut diff --git a/lib/Devel/REPL/Plugin/Nopaste.pm b/lib/Devel/REPL/Plugin/Nopaste.pm index 59e5e4a..2a88004 100644 --- a/lib/Devel/REPL/Plugin/Nopaste.pm +++ b/lib/Devel/REPL/Plugin/Nopaste.pm @@ -116,7 +116,7 @@ the nopaste site. For example: C<#pastetitle example of some code> -defaults to 'Devel::REPL session' +defaults to C<'Devel::REPL session'>. =head1 CONFIGURATION @@ -134,7 +134,7 @@ The default of commenting out the output would be set like this: C<< $_REPL->nopaste_format( 'comment_output' ); >> -These options can be set during a Devel::REPL session, but only affect +These options can be set during a L session, but only affect the future parts of the session, not the past parts. =head1 AUTHOR diff --git a/lib/Devel/REPL/Plugin/OutputCache.pm b/lib/Devel/REPL/Plugin/OutputCache.pm index 79bf4e6..4115fa8 100644 --- a/lib/Devel/REPL/Plugin/OutputCache.pm +++ b/lib/Devel/REPL/Plugin/OutputCache.pm @@ -75,7 +75,7 @@ your result instead of having to type it in all at once, or store it in intermediate variables. C also provides C<< $_REPL->output_cache >>, an array reference of all results in this session. -Devel::REPL already has a similar plugin, L. +L already has a similar plugin, L. There are some key differences though: =over 4 @@ -103,7 +103,7 @@ does the parsing -- no surprises. The C<_> sub is shared across all packages. This means that if a module is using the C<_> sub, then there is a conflict and you should not use this -plugin. For example, L uses the C<_> sub for localization. Jifty is the +plugin. For example, L uses the C<_> sub for localization. L is the only known user. =head1 SEE ALSO diff --git a/lib/Devel/REPL/Plugin/ReadLineHistory.pm b/lib/Devel/REPL/Plugin/ReadLineHistory.pm index 8199859..6a50e7f 100644 --- a/lib/Devel/REPL/Plugin/ReadLineHistory.pm +++ b/lib/Devel/REPL/Plugin/ReadLineHistory.pm @@ -101,12 +101,12 @@ and to disable history expansion from GNU readline/history do =head1 CONFLICTS -Note that Term::ReadLine::Perl does not support a history +Note that L does not support a history expansion method. In that case, you may wish to use the -Devel::REPL History plugin which provides similar functions. -Work is underway to make use of either History or -ReadLineHistory consistent for expansion with either the -Term::ReadLine::Gnu support or Term::ReadLine::Perl. +L which provides similar functions. +Work is underway to make use of either L or +L> consistent for expansion with either the +L support or L. =cut