home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / perl / 4891 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  2.1 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!wupost!usc!isi.edu!sondeen
  2. From: sondeen@isi.edu (Jeff Sondeen)
  3. Newsgroups: comp.lang.perl
  4. Subject: "b subname" doesn't work in "perl -d" (v. 4.019) ?
  5. Message-ID: <21995@venera.isi.edu>
  6. Date: 22 Jul 92 20:30:56 GMT
  7. Sender: news@isi.edu
  8. Organization: USC-Information Sciences Institute
  9. Lines: 55
  10.  
  11. When I run the perl debugger (ala "perl -d"), and say "b subname" and
  12. "c", I expect the debugger to break on the first line of the
  13. subroutine, however it doesn't.  If I explicitely say "b <some line #
  14. in subname>", then it does break there.  Here's the details:
  15.  
  16. 194% perl -d ~/bin/edifi.p bigmult.edn
  17.  
  18. Loading DB routines from $RCSfile: perldb.pl,v $$Revision: 4.0.1.2 $$Date: 91/11/05 17:55:58 $
  19. Emacs support available.
  20.  
  21. Enter h for help.
  22.  
  23. main'(/sondeen/bin/edifi.p:11):  $rename = 1;
  24.   DB<1> b legal
  25.   DB<2> b 664
  26.   DB<3> L
  27. 11:     $rename = 1;
  28. 654:    sub legal {
  29.   break if (1)
  30. 664:            return 0 if ($name =~ /^\d/ && $name !~ /^\d+$/);
  31.   break if (1)
  32.   DB<3> c
  33. main'legal(/sondeen/bin/edifi.p:664):            return 0 if ($name =~ /^\d/ && $name !~ /^\d+$/);
  34.   DB<3> 
  35.  
  36.  
  37. The problem is that the break was on line 664, not the first line of sub
  38. "legal" which is 662:
  39.  
  40.  
  41. 654:    sub legal {
  42. 655:            local($name) = @_;
  43. 656:            local($i);
  44. 657:
  45. 658:    #       note: we must make names legal to the Hspice netlist generator
  46. 659:    #       in cadence, which limits names to 7 chars, and generates names
  47. 660:    #       of format I or N followed by int.
  48. 661:
  49. 662:            return 0 if (length($name) > $max_name_length);
  50. 663:
  51. 664:            return 0 if ($name =~ /^\d/ && $name !~ /^\d+$/);
  52. 665:
  53. 666:            for ($i = 0; $i <= $#bad_chars; $i++) {
  54. 667:                    return 0 if index($name,$bad_chars[$i]) >= 0;
  55. 668:            }
  56. 669:            1;
  57. 670:    }
  58.  
  59.  
  60. Thanks for any help.
  61. --
  62. /jeff.  "A sloppy, ungroomed appearance or inappropriate dress may be of
  63. great diagnostic significance, suggesting intellectual subnormality, a
  64. serious psychiatric disturbance, or a psychopathic disregard for
  65. social conventions."  -- Robert Gregory, Adult Intellectual Assessment
  66.