in reply to Re: package vs module?
in thread package vs module?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: package vs module?
by zentara (Cardinal) on Mar 27, 2014 at 10:02 UTC | |
I also just passed up reading all the links you posted, and failed to realize that what I said, was basically the topic of the Simple Module Tutorial, but in far less words. . Mea Culpa, Mea Culpa, Mea Maxima Culpa!. :-) I'm not really a human, but I play one on earth. Old Perl Programmer Haiku ................... flash japh | [reply] |
by Anonymous Monk on Mar 27, 2014 at 11:19 UTC | |
...Mea Culpa, Mea Culpa, Mea Maxima Culpa!. :-) I quite liked you description :) So here is the zentara package/module tutoriala package (ZenTara) is inlined with the main source codezen-pack.pl
a module is when you put the package into a separate fileZenTara.pm , save in current directory or in ... site/lib/ZenTara.pm
zen-mod.pl is the perl program that does not inline but instead uses ZenTara
less typing by importing functions from ZenTaraE; also making objectszen-mod-exp.pl imports hello/goodbye from ZenTaraE, also creates an object
ZenTaraE.pm uses Exporter to export hello/goodbye by default, and has object constructor "new"
rip modules apart and insert them directly into your scriptzen-mod-exp-inlined.pl inlining comes first before main program with %INC trick to make ZenTaraEI useable
See how they run
For more info see Simple Module Tutorial and perlmod | [reply] [d/l] [select] |
by zentara (Cardinal) on Mar 27, 2014 at 14:17 UTC | |
I'm not really a human, but I play one on earth. Old Perl Programmer Haiku ................... flash japh | [reply] |