note
naikonta
Just to add some notes....
<p>I hope you're not confused between package <c>main</c> and <c>Main</c>. The former is automatically provided by Perl and each Perl program are implicitly in a package <c>main</c>. The later is normal user-defined package name.
<p>Package <c>Main::Contact</c> indicates nothing about inheritance between <c>Main</c> and <c>Contact</c>, the double colon ("::") notation indicates physical structure where <c>Main</c> is the <i>directory</i> under which the <i>file</i> <c>Contact.pm</c> is located (it doesn't mean though that <c>Main.pm</c> doesnt exist).
<p>About the layout.... I get used to put my private Perl modules under directory <c>lib</c> as found in CPAN module distributions (e.g. <c>CGI-Application-x.yy/lib/CGI/Application.pm</c>). You may also use <c>lib/perl</c> as seen in the standard Perl module directories layout by the system (e.g <c>/usr/lib/perl</c> or <c>/usr/lib/perl5</c>). If there are more sibling directories (as in my case), they are all under single directory (e.g. <c>myappl</c>) so later I can say,
<code>
use lib '/path/to/myappl/lib'; # or
#use lib '/path/to/myappl/lib/perl'; # whichever the case
</code>
to let Perl knows where to search for my private modules.
<div class="pmsig"><div class="pmsig-607636">
<hr size="1" noshade="1">
<p align="right"><small>
<i>Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!</i></small></p>
</div></div>
665118
665118