in reply to Re^2: Fill an array in a module ?
in thread Fill an array in a module ?

Each module can be given its own namespace (as shown in the code example via package) or, indeed, any namespace. It's not automatic.

:) Yup its not automatic, but a "module" has a specific meaning:) A module is a namespace (package Foo) associated with a file (Foo.pm). A module is a package you can use or require. So if it doesn't do these things we usually don't call it a module :)

Replies are listed 'Best First'.
Re^4: Fill an array in a module ?
by dsheroh (Monsignor) on Sep 14, 2014 at 07:59 UTC
    It would be nice if "module" had a single, specific meaning throughout the world of Perl, but it doesn't. In my experience, it pretty much always means a .pm file, but that file may or may not contain a package and, if it does, the package may or may not have the same name as the file. A module usually contains a package of the same name, but not always.

      perlmod implies a module is supposed to be name.pm with a package name declaration, but like many things, "supposed to be" and "actually is" may not be the same.