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 do you match one letter in the current locale?
How to create a directory in perl?
What can be done for efficient parameter passing in perl?
What does next statement do in perl?
How are parameters passed to subroutines in perl?
Explain what is the scalar data and scalar variables in Perl?
How to convert arrays into a string in perl?
When would `local $_' in a function ruin your day?
Which functions in perl allows you to include a module file. State their differences.
How and what are closures implemented in perl?
You want to download the contents of a url with perl. How would you do that?
How many types of operators are used in the Perl?
How to change a directory in perl?
Define perl scripting?
Perl uses single or double quotes to surround a zero or more characters. Are the single(' ') or double quotes (" ") identical?