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
How many types of operators are used in the Perl?
What is perl? What is the basic command to print a string in perl?
Explain ivalue?
For a situation in programming, how can you determine that Perl is a suitable?
Explain perl.
What is perl programming?
What does the qx{ } operator do?
What is the purpose of “_file_ literal” and “_line_ literal” in perl?
Hi, I am a accountant. I am preparing a balance sheet but because of staff shortage and time pressures I cant complete it on time. There is lot of common data with last years which I need not retype and I can manage by editing last year’s balance sheet ? Is their any software on net where I can do this easily??
List all the features of perl programming?
How do I send e-mail from a Perl/CGI program on a Unix system?
There are two types of eval statements i.e. Eval expr and eval block. Explain them.
What is the use of now constructor in perl?
Give an example of the -i and 0s option usage.
Explain the various characteristics of perl.