G'day ibm1620,

I can replicate your results.

I made a verbatim copy of foo.pl (including shebang and v5.36). I have the latest versions of DB::Pluggable (1.112001) & Data::Printer (1.001000). I get identical output to what you show for 'perl -d ./foo.pl'.

I also tried with .perldb code formatted as shown in DB::Pluggable - SYNOPSIS. The result was the same ("prints twice") except, of course, for:

DB<2> c Here is ~/.perldb: use DB::Pluggable; DB::Pluggable->run_with_config(\<<EOINI); [DataPrinter] EOINI main::(./foo.pl:10): my $foo = 1; # set breakpoint here and issue p + @xx
"I get the same result when I remove the last 3 lines from foo.pl"

My result starts the same but ends with:

DB<3> c Debugged program terminated. Use q to quit or R to restart,

I don't see this as being related to "prints twice"; however, it might be worth checking that the code you posted is the same as what you're running. After removing 3 lines, my last statement is 'my $foo = 1;'.

— Ken


In reply to Re: Using Data::Printer from the Perl debugger by kcott
in thread Using Data::Printer from the Perl debugger by ibm1620

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.