iT邦幫忙

0

How control @INC in executing perl to use the files stored in any working directory ?

  • 分享至 

  • xImage

Dear all :
I am trying to execute one perl file which use a lot of files such as
.....
use MatchEntry;
use .....;
use .....;

When I compiled it under the working directory which both files, this perl and MatchEntry.pm, resides in, Perl compiler could find this file, MatchEntry.pm.
However, When I used the absolute directory path to invoke this perl under other working directory where MatchEntry is not existent, the following error message pops up,
Can't locate MatchEntry.pm in @INC (@INC contains: xxxxxxx . ) at (perl) in line 35.
BEGIN failed -- compilation aborted at (perl) line 35.
( PS : xxxxxx represent a lot of directory paths, (perl) means the specific file name prefixed with the specific absolute directory path, for example, /abc/xyz/efg.pl, efg.pl is perl file name, /abc/xyz/ is the folder where efg.pl reside in )

Could you please help solve the issue ?
Thank you

froce iT邦大師 1 級 ‧ 2020-04-17 07:22:50 檢舉
https://tw.perlmaven.com/how-to-change-inc-to-find-perl-modules-in-non-standard-locations
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友回答

立即登入回答