What is the difference between module and package?
Answer Posted / rameshravi
A package is a division of the global namespace; that means
you can have a global variable $foo and/or a sub named foo
in one package and a different global variable $foo and
different sub named foo in a different package.
A "module" is a file named according to the package it
contains, so module Foo::Bar would be in a file named
Foo/Bar.pm. There's no need for packages to be modules or
for a module to contain only that one package.
The term "module distribution" refers to a collection of one
or more modules that get built/installed together. Sometimes
the "distribution" part is left off and it's just called
"module", but it's really a different idea than a single module.
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Write a program that explains the symbolic table clearly.
What does file test operators do in perl?
What is the use of "stderr()"?
Comment on data types and variables in perl.
What are the advantages of c over Perl?
Write a cgi program to show the header part?
How to sort arrays in perl?
What are scalar data and scalar variables?
what is perl language?
How to create a package?
Which has the highest precedence, List or Terms? Explain?
Explain socket programming in perl?
How interpreter is used in perl?
What are the arguments and what do they mean in perl programming?
How does polymorphism work in perl? Give an example.