home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / perl / 7979 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.7 KB  |  58 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!uvaarpa!mmdf
  3. From: " (Paul Marquess)" <pmarquess@rosebud.bfsec.bt.co.uk>
  4. Subject: Strange behavior with -w and usersubs
  5. Message-ID: <1993Jan25.131348.19731@uvaarpa.Virginia.EDU>
  6. Sender: mmdf@uvaarpa.Virginia.EDU (Mail System)
  7. Reply-To: pmarquess@bfsec.bt.co.uk
  8. Organization: The Internet
  9. Date: Mon, 25 Jan 1993 13:13:48 GMT
  10. Lines: 46
  11.  
  12. I have been playing with usersubs recently and have come across some
  13. strage behavior when using the -w command line option to check for
  14. errors.
  15.  
  16. Take, for example, curseperl and the pager application which comes with
  17. the standard 4.035 distribution. If I type
  18.  
  19.     curseperl -wc pager
  20.  
  21. I get this output
  22.  
  23. Possible typo: "Def_term" at pager line 191.
  24. Possible typo: "ERR" at pager line 191.
  25. Possible typo: "My_term" at pager line 191.
  26. Possible typo: "OK" at pager line 191.
  27. Possible typo: "addch" at pager line 191.
  28. ...
  29. ... [62 lines deleted]
  30. ...
  31.  
  32. Possible typo: "wclear" at pager line 191.
  33. Possible typo: "waddch" at pager line 191.
  34. pager syntax OK
  35.  
  36.  
  37. Perl seems to think that all of the usersubs and uservals which are not
  38. actually used in the script are potential typos. With so many spurious 
  39. typos being displayed it is very difficult to spot the 'real' problems.
  40.  
  41. I can understand why perl should thrown this up for a local sub, but is
  42. this the correct behavior when dealing with usersubs? Surely it is not
  43. a potential error to only use some of the usersub interface routines.
  44.  
  45. Does anyone agree?
  46.  
  47. Will this be fixed in Perl 5?
  48.  
  49. Have I missed something fundamental :-) ?
  50.  
  51.  
  52. Paul Marquess                 Tel:    +44 232 894-265
  53. BT                          Fax:    +44 232 894-316
  54. Royston House               e-mail: pmarquess@bfsec.bt.co.uk
  55. 34 Upper Queen Street
  56. BELFAST BT8 4QY
  57. UK
  58.