5 ms·
I skimmed the article looking for a mention of a REPL or a new debugger. Perl is a great language but it lacks these tools. Sometimes I just want to try a coupl
by auraham 4y ago
I skimmed the article looking for a mention of a REPL or a new debugger. Perl is a great language but it lacks these tools. Sometimes I just want to try a couple of lines of Perl code in a REPL, but I cannot. Instead, I need to create a file. Also, when debugging with `perl -d`, I cannot use the Up arrow key to get the previous command. Not a big deal but the coding experience will be significantly improved with those tools.
- wazoox 4y agoI think that 'perl -d' needs to have Term::Readline to be installed to provide line editing. Otherwise you could use DDD, which provides an ugly but functional GUI to gdb, and perl -d. Or ptkdb which is better IMO ('perl -d ptkdb', requires the module and Tk).
- arunix 4y agoThis is what I do to get that functionality: rlwrap perl -dee https://linux.die.net/man/1/rlwrap https://linux.die.net/man/1/rlwrap
- heresie-dabord 4y agoThis is a simple REPL project and the readme lists other Perl REPLs. https://github.com/viviparous/preplish https://github.com/viviparous/preplish Perl's concise syntax makes working in a REPL a pleasure. Python has a REPL but the design of the language makes it expand both in length (for loops) and in width (tabs). I am a recent convert to working in a REPL first to test programming ideas.
- darrenf 4y agoThere are several, highly configurable (of course) and usable REPLs. https://metacpan.org/pod/Devel::REPL https://metacpan.org/pod/Devel::REPL https://metacpan.org/pod/Reply https://metacpan.org/pod/Reply Not to mention the Jupyter kernel: https://metacpan.org/dist/Devel-IPerl https://metacpan.org/dist/Devel-IPerl
- ksherlock 4y agohttps://perldoc.perl.org/perldebug#Readline-Support-/-History-in-the-Debugger https://perldoc.perl.org/perldebug#Readline-Support-/-Histor... ``As shipped, the only command-line history supplied is a simplistic one that checks for leading exclamation points. However, if you install the Term::ReadKey and Term::ReadLine modules from CPAN (such as Term::ReadLine::Gnu, Term::ReadLine::Perl, ...) you will have full editing capabilities much like those GNU readline(3) provides. Look for these in the modules/by-module/Term directory on CPAN. These do not support normal vi command-line editing, however.''
- deleted 4y ago[deleted]