perl5db on miniperl
authorIlya Zakharevich <ilya@math.berkeley.edu>
Tue, 28 Nov 2006 03:39:05 +0000 (19:39 -0800)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 28 Nov 2006 13:32:26 +0000 (13:32 +0000)
Message-ID: <20061128113905.GA18135@powdermilk.math.berkeley.edu>

p4raw-id: //depot/perl@29403

lib/perl5db.pl

index 2b022d4..f665583 100644 (file)
@@ -498,7 +498,7 @@ where it has to go.
 
 package DB;
 
-use IO::Handle;
+BEGIN {eval 'use IO::Handle'}; # Needed for flush only? breaks under miniperl
 
 # Debugger for Perl 5.00x; perl5db.pl patch level:
 $VERSION = 1.28;
@@ -3427,8 +3427,10 @@ any variables we might want to address in the C<DB> package.
                 $onetimedumpDepth = undef;
             }
             elsif ( $term_pid == $$ ) {
-                STDOUT->flush();
-                STDERR->flush();
+               eval {          # May run under miniperl, when not available...
+                    STDOUT->flush();
+                    STDERR->flush();
+               };
 
                 # XXX If this is the master pid, print a newline.
                 print $OUT "\n";