Aug 8, 2014, 8:59 AM
Post #4 of 4
Re: [BillKSmith] Handling own modules
[In reply to]
In general, the last statement must be the single character '1'. The file must be stored in one of the folders where perl looks for modules. (This does not include the current directory by default.
Sorry Bill, but that's not correct.
It's good that you qualified the first part of your statement by saying "In general", but the last statement does not have to be a '1'. It must evaluate to "true".
On all system that I use, the cwd is included when searching for modules even though it's not in the @INC array.
My synergy connection to my linux box just died but I'll post an example once I get it back up.
[root@099-91-RKB-2 ~]# cat MyModule.pm
[root@099-91-RKB-2 ~]# cat test.pl
print $_,$/ for @INC;
[root@099-91-RKB-2 ~]# ./test.pl
[root@099-91-RKB-2 ~]# pwd
(This post was edited by FishMonger on Aug 8, 2014, 9:11 AM)