I'm running Perl 5.8 on AIX 5.2. I'm trying to modularize a program for maintenance sake, and having no luck. I'd also like to be able to pull in just the functions I need at runtime with require, but I'm willing to do without that.
I pulled out several sets of functions and placed each set in a separate .pl file, and then ran pl2pm on each file. I put them in a subdirectory of the current directory called focus, and added "use lib ./focus" to the front of the main program. However, when I run the program, I still get output such as the following:
Can't locate base in @INC(@INC contains: ./focus /usr/opt/perl5/lib/5.8.0/aix-thread-multi /usr/opt/perl5/lib/5.8.0 /usr/opt/perl5/lib/site_perl/5.8.0/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.0 /usr/opt/perl5/lib/site_perl .) at sl_observe.pl line 216.
I've tried using the modules in the same directory, in the subdirectory, with different names, etc. Following is the block of code containing my require statement:
foreach $focus_area (@focus_areas_list) {
if ($areas =~ /$focus_area/) {
chop $focus_area;
push @focus_areas, $focus_area;
require "$focus_area";
}
} In reply to can't find my module? by arootbeer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |