Chas. Owens wrote:
On Fri, Aug 4, 2017 at 9:25 AM hw <h...@gc-24.de <mailto:h...@gc-24.de>> wrote: snip Now I´m confused as to what is a module and a package. Both are files. No, packages are not files. A package is created by a package statement: package Foo;
This I put into a file.
If you do not explicitly create a package with a package statement, then you are in the main package. A package is a namespace. Functions and package variables created in one are associated with it. A module is a file that is loaded by a require or use statement. The only other requirement is that it end with a true value (usually 1).
Yes, I have done that, too.
Often you will see a module that contains one package statement which leads to the confusion.
Huh? How many package statements is a module supposed to contain? And doesn´t a package statement turn a module into a package? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/