1Devel::REPL::Plugin::MuUlsteirLiCnoen:t:rPiPbIu(t3e)d PeDrelveDlo:c:uRmEePnLt:a:tPiloungin::MultiLine::PPI(3)
2
3
4
6 Devel::REPL::Plugin::MultiLine::PPI - read lines until all blocks are
7 closed
8
10 #!/usr/bin/perl
11
12 use lib './lib';
13 use Devel::REPL;
14
15 my $repl = Devel::REPL->new;
16 $repl->load_plugin('LexEnv');
17 $repl->load_plugin('History');
18 $repl->load_plugin('MultiLine::PPI');
19 $repl->run;
20
22 Plugin that will collect lines until you have no unfinished structures.
23 This lets you write subroutines, "if" statements, loops, etc. more
24 naturally.
25
26 For example, without a MultiLine plugin,
27
28 $ my $x = 3;
29 3
30 $ if ($x == 3) {
31
32 will throw a compile error, because that "if" statement is incomplete.
33 With a MultiLine plugin,
34
35 $ my $x = 3;
36 3
37 $ if ($x == 3) {
38
39 > print "OH NOES!"
40
41 > }
42 OH NOES
43 1
44
45 you may write the code across multiple lines, such as in "irb" and
46 "python".
47
48 This module uses PPI. This plugin is named "MultiLine::PPI" because
49 someone else may conceivably implement similar behavior some other less
50 dependency-heavy way.
51
53 "Devel::REPL"
54
56 Shawn M Moore, "<sartak at gmail dot com>"
57
59 Copyright (C) 2007 by Shawn M Moore
60
61 This library is free software; you can redistribute it and/or modify it
62 under the same terms as Perl itself.
63
64
65
66perl v5.12.1 2010-05D-e2v3el::REPL::Plugin::MultiLine::PPI(3)