regnad42 has asked for the wisdom of the Perl Monks concerning the following question:

I would like to know how to use the command line in PERL debug. I am using a 'Mintty' terminal window under 'Cygwin' and typically attempting to debug a script I have edited in VIM or somesuch. I then execute "perl -d codefile.pl". I do not ming retyping the small commands like

X variable

the problem is when I type a longer string, and make a small error, omission of a comma, or quote and want to hit up arrow then edir and fix it to attempt to get the correct result. What kind of 'CLI' does the debugger have to correct a previous line? Does one need to copy/paste or os there something more clever?

Replies are listed 'Best First'.
Re: CLI in debug?
by jimpudar (Pilgrim) on Nov 07, 2018 at 19:32 UTC

    Hi regnad42,

    Please check out perldebug. You probably need to install something like  Term::ReadLine::Perl from CPAN.

    Best,

    Jim

    πάντων χρημάτων μέτρον έστιν άνθρωπος.

Re: CLI in debug?
by garryq (Initiate) on Nov 08, 2018 at 13:23 UTC

    You can also save your history for next time if you make a ~/.perldb file and put something like this in it:

    &parse_options("HistFile=$ENV{HOME}/.perldb.hist");

    Garryq

Re: CLI in debug?
by happy.barney (Friar) on Nov 11, 2018 at 13:27 UTC
    Not exactly answer to your question, just mentioning interesting module I learned from one lightning talk from Glasgow: Devel::PDB