home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl501m.zip / OS2 / contrib < prev    next >
Text File  |  1995-04-18  |  3KB  |  84 lines

  1. 
  2. From math.ohio-state.edu!ilya Mon Dec 26 23:57:51 1994 remote from ananke
  3. Received:  from delos by ananke.s.bawue.de (UUPC/extended 1.12j) with UUCP
  4.            for ak; Mon, 26 Dec 1994 23:57:51 +0100
  5. Received: from monk.mps.ohio-state.edu by delos.s.bawue.de with smtp
  6.     (Smail3.1.28.1 #3) id m0rM7QX-000BHXC; Mon, 26 Dec 94 05:52 MET
  7. Received: (from ilya@localhost) by monk.mps.ohio-state.edu (8.6.9/8.6.9) id XAA08584 for ak@ananke.s.bawue.de; Sun, 25 Dec 1994 23:54:23 -0500
  8. From: Ilya Zakharevich <ilya@math.ohio-state.edu>
  9. Message-Id: <199412260454.XAA08584@monk.mps.ohio-state.edu>
  10. Subject: Re: perl5/os2
  11. To: ak@ananke.s.bawue.de (Andreas Kaiser)
  12. Date: Sun, 25 Dec 1994 23:54:23 -0500 (EST)
  13. In-Reply-To: <2ef48d8d.ananke@ananke.s.bawue.de> from "Andreas Kaiser" at Dec 18, 94 08:29:17 pm
  14. X-Mailer: ELM [version 2.4 PL24]
  15. MIME-Version: 1.0
  16. Content-Type: text/plain; charset=US-ASCII
  17. Content-Transfer-Encoding: 7bit
  18. Content-Length: 1926      
  19. Status: RO
  20.  
  21. > > F:\ckermit\get\perl5os2\os2>perl5 -de 0
  22. > > Out of memory!
  23. > I did not test the Perl debugger before. Right today I did. Same here.
  24. > You seem to have a lot of patience (or not enough paging space ;-). 
  25. > Fixed now (-c "/dev/con" now returns true). As an interim fix, edit
  26. > perldb.pl and unconditionally set $console to "/dev/con".
  27. > > By the way, probably you do know: gdb can work inside emacs, other
  28. > > programs do not (in OS/2). Probably there is some hack in gdb to do
  29. > > it. Is it managable to do the same with perldb?
  30. > I don't know. I rarely use emacs, ask the "emacs community".
  31. >         Gruss, Andreas Kaiser
  32.  
  33. My patch follows. As writer of PMEmacs says, there is no way to send
  34. output to emacs if a program is executed "in the buffer", but there
  35. was redirection on the command line. However, if there is no
  36. redirection, then the only way is to use STDOUT and STDIN. Moreover,
  37. my patch hase a slightly better chance of making it to the standard
  38. distribution. 
  39.  
  40. *** F:/ckermit/get/lib/perl5db.pl    Tue Oct 11 08:36:22 1994
  41. --- perl5db.pl    Wed Dec 21 11:15:38 1994
  42. ***************
  43. *** 29,34 ****
  44. --- 29,46 ----
  45.       $console = "sys\$command";
  46.       $rcfile="perldb.ini";
  47.   }
  48. + # Is Perl being run from Emacs?
  49. + $emacs = $main::ARGV[0] eq '-emacs';
  50. + shift(@main::ARGV) if $emacs;
  51. + # Around a bug:
  52. + if (defined $ENV{'OS2_SHELL'}) { # In OS/2
  53. +   if ($emacs) {
  54. +     $console = undef;
  55. +   } else {
  56. +     $console = "/dev/con";
  57. +   }
  58. + }
  59.   
  60.   open(IN, "<$console") || open(IN,  "<&STDIN");    # so we don't dingle stdin
  61.   open(OUT,">$console") || open(OUT, ">&STDERR")
  62. ***************
  63. *** 38,47 ****
  64.   select(STDOUT);
  65.   $| = 1;                # for real STDOUT
  66.   $sub = '';
  67. - # Is Perl being run from Emacs?
  68. - $emacs = $main::ARGV[0] eq '-emacs';
  69. - shift(@main::ARGV) if $emacs;
  70.   
  71.   $header =~ s/.Header: ([^,]+),v(\s+\S+\s+\S+).*$/$1$2/;
  72.   print OUT "\nLoading DB routines from $header\n";
  73. --- 50,55 ----
  74.  
  75.