Module lookup starting with "::"


#1

hello, could anyone explain why sometimes a module is
referenced with “::” before its name? like in

::a::b::C

is it equivalent to the regular form “A::b::C”?

thanks


#2

It’s simply saying “do the lookup starting at the global scope and work
down” instead of “go up the scope hierarchy until you find what I’m
looking
for”.
Useful in the case where you might have similarly named classes in
differing
scopes and need to specify exactly which class you want.

Jason


#3

thanks Jason, very clear explanation.