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