|
|
| Just another Perl shrine | |
| PerlMonks |
using the Modulesby programmer.perl (Sexton) |
| on Jul 15, 2012 at 10:44 UTC ( #981891=perlquestion: print w/ replies, xml ) | Need Help?? |
|
programmer.perl has asked for the
wisdom of the Perl Monks concerning the following question:
Hi everyone, I wrote a module House.pm and I save it in a directory /home/hamidjon/Perl/Learning/code_examples/myModules The script of a House.pm is:
To use this module I'm adding this line to my program: use lib ("/home/hamidjon/Perl/Learning/code_examples/myModules"); Am I doing right by adding this line? Are there any other (most correct) ways to use? What does mean the code line: unshift(@INC, "directory"), first I used unshift(@INC, ""); method but it didn't work, then I used 'use lib ("directory");' and it worked, is it true? Thank you... Code of program that uses the House.pm module:
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||