Convert to a lexical file handle.
authorShlomi Fish <shlomif@shlomifish.org>
Sat, 3 Nov 2012 20:47:49 +0000 (22:47 +0200)
committerRicardo Signes <rjbs@cpan.org>
Mon, 12 Nov 2012 14:18:44 +0000 (09:18 -0500)
lib/perl5db.pl

index ee4beeb..2f9e197 100644 (file)
@@ -7728,9 +7728,11 @@ sub LineInfo {
         # If this is a pipe, the stream points to a slave editor.
         $slave_editor = ( $stream =~ /^\|/ );
 
+        my $new_lineinfo_fh;
         # Open it up and unbuffer it.
-        open( LINEINFO, $stream ) || _db_warn("Cannot open '$stream' for write");
-        $LINEINFO = \*LINEINFO;
+        open ($new_lineinfo_fh , $stream )
+            or _db_warn("Cannot open '$stream' for write");
+        $LINEINFO = $new_lineinfo_fh;
         $LINEINFO->autoflush(1);
     }