in reply to basic conception?
The main reason to be aware of namespaces is that you cannot have two things of the same type with the same name in the same namespace, but you can do that if they are in different namespaces. For example, each package in Perl defines a new namespace, which is why different packages can have variables with the same name and not have them conflict with each other. In perl, the fully qualified name of a variable or a subroutine is given by prepending its package name separated by two colons. So for example, if both packages A and B define a variable v, they are actually two different variables, with the full names $A::v and $B::v.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: basic conception?
by turnstep (Parson) on Apr 25, 2000 at 21:42 UTC |