I have the following directory structure for storing
my code and the personal package use by the code.
Currently in mycode.pl
, I have:
use lib "home/neversaint/MyPerl/src/mypackage.pm";
# the rest of my code
Although this gives no problem:
~/MyPerl $ perl -c src/mycode.pl
mycode.pl syntax ok
But when I run the code it fails
to recognize the subroutine which I kept in
~/MyPerl $ perl src/mycode.pl some_arg
Undefined subroutine &main::some_subrutine called at src/mycode.pl lin
What's wrong with the way I set the path of my local package? How can overcome this problem?
neversaint and everlastingly indebted.......