Lrmk wrote:
I used to upload the pm files in to a directory using a FTP program
and in to a folder in my web site and add the full path of that
directory in to the @INC array in each of the perl scripts that
uses that module and then inport the module. So far it worked for
me.
ex:-
if your module is MyModule.pm ant it is uploaded to
/home/myuser/my_module_store
add this code to your scripts
unshift @INC '/home/myuser/my_module_store';
use MyModule;
That does not work. unshift() is executed at run time, while use
statements are executed at compile time. You can do
unshift @INC '/home/myuser/my_module_store';
require MyModule;
or
BEGIN { unshift @INC '/home/myuser/my_module_store' }
use MyModule;
or
use lib '/home/myuser/my_module_store';
use MyModule;
I am not sure whether this works for complex modules that has c
compiled files in it.
Typically it doesn't.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>