home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / perl / 7463 < prev    next >
Encoding:
Text File  |  1992-12-16  |  1.6 KB  |  33 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!csn!cherokee!da_vinci!lookout.it.uswc.uswest.com!rray
  3. From: rray@lookout.it.uswc.uswest.com (Randy J. Ray)
  4. Subject: Package & Namespace Question
  5. Message-ID: <BzD4Hw.AG8@da_vinci.it.uswc.uswest.com>
  6. Sender: rray@snakepit (Randy J. Ray)
  7. Nntp-Posting-Host: snakepit
  8. Organization: US WEST Communications, Inc. -- Denver, CO
  9. Date: Wed, 16 Dec 1992 17:27:31 GMT
  10. Lines: 21
  11.  
  12. Having coded quite a bit, and become somewhat familiar with this language, I
  13. have a question of curiousity. This is not intended to be critical of any
  14. design choices on the part of the perl creators, but it's something I would
  15. like to know.
  16.  
  17. Why is it that: when calling subroutines defined in the main namespace from
  18. within some package, you must explicitly refer to main? Why is there not some
  19. syntactical rule that says, "If this routine is not defined at this level, look
  20. for it in main before reporting an error"? I can understand specifying
  21. &main'phred() when you want to use that instead of a package-defined &phred.
  22. Is it that main is not necessarily above other packages in hierarchy, and
  23. therefore it is not the natural progression to look for those routines
  24. elsewhere?
  25.  
  26. Randy
  27. -- 
  28. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  29. Randy J. Ray -- U S WEST IT/CSD                 rray@lookout.it.uswc.uswest.com
  30.                                                            Phone: (303)595-2852
  31. "It's not denial. I'm just very selective about the reality I accept." --Calvin
  32. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  33.