in reply to Re^3: Debugger Bug?
in thread Debugger Bug?

Sure, turning on AUTOFLUSH helps!

DB<1> $| = 1 DB<2> x print "horst" horst0 1 DB<3> p print "horst" horst1 DB<4> print "horst" horst

But it's strange that only x doesn't flush automatically while other commands do ...

DB<5> $| = 0 DB<6> x print "horst" 0 1 DB<7> print "horst" horsthorst DB<8> p print "horst" 1horst

Cheers Rolf

Replies are listed 'Best First'.
Re^5: Debugger Bug? (who cares?)
by tye (Sage) on Sep 03, 2009 at 02:08 UTC
    But it's strange that only x doesn't flush automatically

    Not any stranger than using x and print together. I'm not terribly surprised that this particular combination was not "expected". In any case, the code in question is:

    # Turn off the one-time-dump stuff now. if ($onetimeDump) { $onetimeDump = undef; $onetimedumpDepth = undef; } elsif ( $term_pid == $$ ) { eval { # May run under miniperl, when not ava +ilable... STDOUT->flush(); STDERR->flush(); }; # XXX If this is the master pid, print a newline. print $OUT "\n"; }

    - tye        

      Not any stranger than using x and print together.

      Maybe this example is easier for you to "accept" as a use case?

      DB<1> sub doit { print "test"; return 1..3} DB<2> x doit() 0 1 1 2 2 3 DB<3> test DB<3> p doit() 123test

      As I updated in the OP, when you are using the debugger as a REPL, these inconsistencies are strange enough to care for.

      Cheers Rolf