Devel:...ne::PPI(3pm)
β¨ NAME β¨
Devel::REPL::Plugin::MultiLine::PPI β bestie, it reads lines until all your blocks are closed π
Like, it's a plugin from Devel::REPL (that's a User Contributed Perl Documentation page, iykyk), and its whole personality is: keep collecting input until nothing's left hanging open. Periodt.
πΈ VERSION πΈ
This is version 1.003029, no cap.
π SYNOPSIS π
Here's the whole vibe in code, bestie:
use Devel::REPL;
my $repl = Devel::REPL->new;
$repl->load_plugin('LexEnv');
$repl->load_plugin('History');
$repl->load_plugin('MultiLine::PPI');
$repl->run;
That's it. That's the setup. π
π¦ DESCRIPTION π¦
Okay so this plugin is the friend who waits for you to finish your sentence before replying. It collects lines until you have no unfinished structures β like, zero loose ends, main character energy only.
Which means you get to write subroutines, if statements, loops, etc. way more naturally, instead of cramming everything onto one cursed line.
Let's do a little before-and-after, because the glow-up is real:
Before β no MultiLine plugin, and the terminal is being so dramatic:
$ my $x = 3;
3
$ if ($x == 3) {
Not me getting a compile error π β and it's literally just because that if statement is incomplete. It's giving "half-finished thought".
After β with a MultiLine plugin, we're thriving:
$ my $x = 3;
3
$ if ($x == 3) {
> print "OH NOES!"
> }
OH NOES
1
See how the prompt switches to > while it's waiting for you to close the block? Obsessed. So now you may write the code across multiple lines, just like in irb and python. Iconic behaviour, honestly. π
This module uses PPI. And why is it named MultiLine::PPI instead of just MultiLine? Because someone else may conceivably implement similar behavior some other, less dependency-heavy way. Considerate of them, fr fr. π«Ά
π SEE ALSO π
"Devel::REPL"β the whole reason we're here, the parent show.
π SUPPORT π
Got bugs? Bestie, they may be submitted through the RT bug tracker: <https://rt.cpan.org/Public/Dist/Display.html?Name=Devel-REPL>
Or you can email them straight to bug-Devel-REPL@rt.cpan.org (that's mailto:bug-Devel-REPL@rt.cpan.org if you need the link form). π
There's also an irc channel available for users of this distribution, hanging out at "#devel" on "irc.perl.org" β that's irc://irc.perl.org/#devel-repl for the cool kids who like protocols. Come say hi! π¬
π AUTHOR π
Shawn M Moore, "<sartak at gmail dot com>". Living legend, we stan. β¨
π COPYRIGHT AND LICENSE π
Copyright (C) 2007 by Shawn M Moore
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Slay. π
That's the whole page, bestie β go forth and write multi-line Perl like the main character you are. π¦
Signing off from perl v5.34.0, dated 2022-06-03 β that's the footer, babes, and we're done here. π
π¦ where this page comes from
- debian bookworm: libdevel-repl-perl 1.003029-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libdevel-repl-perl 1.003029-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdevel-repl-perl 1.003029-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdevel-repl-perl 1.003029-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdevel-repl-perl 1.003029-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms