[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: use base peculiarities
>>>>> On Wed, 19 Jan 2000 11:27:02 -0700, Tom Christiansen <tchrist@chthon.perl.com> said:
> Why does base.pm not use %ISA to decide whether to require? Why
You mean @ISA, not %ISA, right?
> does it use the package's $VERSION variable instead? This seems
> to lead to its seting that variable to the bizarre "-1, set by
> base.pm", which isn't even "0 but true" (why isn't it?). Seems to
> me that merely abiding by %ISA would be much clearer.
Is it possible that you confuse the inheritant and the inheritee? @ISA
is defined in the package that inherits, not (necessarily) in the
package we inherit from.
> The archives have some messages about this from Sarathy, Andreas,
> Kurt, and Tim. For example:
> http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/1999-05/msg00811.html
> http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/1999-03/msg01050.html
> Another issue beyond the peculiar disregard for %INC is that base.pm
> conflates the notion of "base package" with physical files in its
> cavalier assumption that every base package must be in its own file.
> For example, this doesn't allow for the fact that one file may
> simultaneously define symbols in multiple package namespaces, as
> we see in Tie/Hash.pm, or as was whilom seen in IO/Socket.pm
> defining IO::Socket::{INET,UNIX}.
The disregard of %INC is due to the very fact that you describe.
*Because* a "base package" doesn't imply the existance of a physical
file, base.pm cannot take %INC into account.
--
andreas
- Follow-Ups from:
-
Gurusamy Sarathy <gsar@ActiveState.com>
- References to:
-
Tom Christiansen <tchrist@chthon.perl.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]