I have a folder with several .plfiles that go through main.pl. I successfully worked with help require 'file.pl';at the beginning of the main file. I also used some modules, no problem.
Now I try to use the “homemade” module, but when I add use Add::Location::CSearch qw(c_search);to the beginning of the file in which it is used (or at the top of the main file) and start the main file, it creates an error Can't locate file.pl in @INC...with file.plbeing the first file in the list requirein the main file.
From how I understand this, after adding a line, usehe now tries to find everything requirein the same directory. At (@INC contains: ...)the end of the error message, some library / module folders are listed. It also has .at the end for the current directory.
Hope I explained it well; this is confusing! I do not know why this is happening and how to solve it, so I would be grateful for any ideas.
Edit: Code Example
main.pl
package testpack;
use lib '/hlib/...';
use Add::DB;
use List::Util qw(sum);
use List::MoreUtils qw(uniq);
use List::MoreUtils qw(firstidx);
use strict;
use warnings;
require 'file1.pl';
require 'file2.pl';
require 'file3.pl';
.
.
.
file1.pl
package testpack;
use Add::Location::CSearch qw(c_search);
This is all that really matters for the problem ... the rest of the files have working code that calls routines, etc.
dgBP source
share