format for use "otherlib\\Module.pm"; 
Author Message
 format for use "otherlib\\Module.pm";

I can't seem to figure out how to make a perl script use a Module in a
directory other than the one it is in. I don't really want to have to
put all of my Perl scripts and modules in one place, but how do I get
the program to know where other libraries are kept?

I've tried changing $ENV{'PATH'} and $ENV{'PERL5LIB'} and

use "C:\\my_dir\\Module.pm";
produces the error:
syntax error at test.pl line 8, next token ???

while

use 'C:\\my_dir\\Module.pm';
produces the error:
syntax error at test.pl line 8, near "use 'C:\\my_dir\\Module.pm'"

I'm running NTPerl 5.001 on a Pentium with Windows 95.
FWIW, I run all of this from within PFE32 as a development environment.

Please e-mail me as well as posting if you can help; there's a lot of traffic
in comp.lang.perl.misc and I may miss followups.

Thanks in advance,
        Chris.

--


Pacific Wildlife Research Centre
Canadian Wildlife Service, Environment Canada



Sat, 03 Oct 1998 03:00:00 GMT  
 format for use "otherlib\\Module.pm";

Quote:

>I can't seem to figure out how to make a perl script use a Module in a
>directory other than the one it is in. I don't really want to have to
>put all of my Perl scripts and modules in one place, but how do I get
>the program to know where other libraries are kept?

Well, posting worked like a charm; I disovered the perl -I lib_name
option (cleverly hidden in the Programming Perl Quick Reference Guide)
within moments of posting :-)

However, I would still like to know if it's possible to directly
use otherplace\Module LIST;
within W95/ntperl 5.001 rather than needing to remember it on the
command line each time.

TIA,
        Chris.

--


Pacific Wildlife Research Centre
Canadian Wildlife Service, Environment Canada



Sat, 03 Oct 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Printing table cells using "format"

2. Using an "@" in a perl format

3. "disappearing" records using DB_File.pm

4. TkPerl5: new module "Flasher.pm"

5. Trouble finding "vars.pm" module

6. module "Exporter.pm"

7. New module/pragma "enum.pm" (was "fields.pm")

8. CGI Module using "redirect"

9. Custom module install using "make"

10. New module/pragma "enum.pm" (was "fields.pm")

11. Problem using "Storable" module

12. Using Modules Breaks "-w"?

 

 
Powered by phpBB® Forum Software