what is the difference between namespace and module?
can anyone help me briefly..
Ok, I am going to give you my take on this, but am sure that someone like Miller or KevinADC will be able to add more to this, even possibly links to better explanations.
A module is basically a set of subroutines that are designed to do a specific set of tasks, all with a common goal/topic. You "use" modules in your Perl code and once you do, their functions are available to you.
Now, say you have two modules that end up having two functions with the same name, but do two completely different things. You need to be able to tell them apart. That is where the module, acts like a namespace.
For example, if modules "My::First::Module" and "My::Second::Module" both have a function called "Count()", but you need the version from "My::First::Module", then you would specify that when you called the function, like so:
My::First::Module::Count(options)
{
some code;
}
Ok, that is my take on this topic. Short and sweet. Hopefully, if there is more, and I am sure there is, that someone will enlighten not only you, but me as well.
Regards,
Jeff