Creating & Using Libraries
- Greets Folks,
This will be half rant, half question. Please bear
with me, and correct me if you think I am wrong.
In many manuals it seems every author has a different
opinion on where a perl library should go, and often
authors seem to assume that the programmer has root
access for module installs. My host is pretty
supportive when it comes to installing modules for me,
but sometimes I just wish I could do it myself, and
this would include both self-made modules as well as
pure perl modules off of CPAN (because not-pure-perl
modules would require root access).
My questions are - 1.) "How do I create the library?"
and 2.) "How do I use the library?" 3.) "How do I
install pure perl CPAN modules in the library?"
I guess the answer to question one is simply to create
a directory somewhere within my user access, and then
give it the proper access permissions.
Then the answer to question two seems to be to list
the path to the library in the module calls, like
use lib '/user/public_html/cgi-bin/library';
BUT, if I understand this correctly that is not enough
because... in addition... I also need to explicitly
state what modules to use from the library in other
module calls... So that, for instance, if I had
installed something like HTML::Template along with a
module I made called DBLogin under that path I just
listed, then I would still have to say:
and so on...
The third thing is that I am still unclear on how to
put CPAN modules into the library. I guess one just
downloads them from CPAN and then uploads them to the
library (using ASCII and proper access permissions),
but, still, if I unzipped a CPAN module on my Windows
system, then would it cause any problems? Or, should
I unzip them on Unix only?
I think that about sums up my concern. I hope I
havent gone on too terribly long, but this has been a
bit frustrating trying to get a handle on it.
Any good help much appreciated.
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.