neversaint has asked for the wisdom of the Perl Monks concerning the following question:
Currently in mycode.pl, I have:~/MyPerl | | |__ src/ |_ mycode.pl | |_ mypackage.pm
Although this gives no problem:use strict; use warnings; use lib "home/neversaint/MyPerl/src/mypackage.pm"; # the rest of my code
But when I run the code it fails to recognize the subroutine which I kept in mypackage.pm~/MyPerl $ perl -c src/mycode.pl mycode.pl syntax ok
What's wrong with the way I set the path of my local package? How can overcome this problem?~/MyPerl $ perl src/mycode.pl some_arg Undefined subroutine &main::some_subrutine called at src/mycode.pl lin +e 10.
|
|---|