in reply to Doubts on "Nesting packages" and "typeglobs"

Typeglobs are explained in perlmod.

Nested packages (like A::B::C) do not inherit any semantics from their "parents" (A or A::B), only the symbol tables are nested (but if you don't walk symbol tables in your program, you won't notice that).

Replies are listed 'Best First'.
Re^2: Doubts on "Nesting packages" and "typeglobs"
by ivancho (Hermit) on Jan 21, 2009 at 07:20 UTC
    to expand on this, you cannot "nest" packages in the sense of C++ nested classes. At any given point, you only have a single package in which the current "compilation unit" exists. As said above, other than clarity, there is little to no value in the actual nesting, generally done through organizing files in sub-directories with the same name as the parent module, unless you are doing something absurdly complex with symbol tables (Don't).

    perlmod would give you a start on globs, but ultimately, the best answer, IMO, is that you shouldn't need to use them for anything until you get a much better knowledge of Perl. While fundamental, they are not a base part of the language, in the way that local variables or functions are.