How do I use a Perl module from a relative location?

前端 未结 8 2199
予麋鹿
予麋鹿 2020-12-23 16:41

I have a dir called foo, and in that I have lib and bin. The scripts in bin need stuff in lib. I do someth

8条回答
  •  北荒
    北荒 (楼主)
    2020-12-23 17:28

    use lib './';
    

    has been working for me with Perl v5.14.2 on a linux box to include files in the same directory as my script.

    Perhaps it would work for you to move your lib and bin directories under your script's working directory and try to reference them using

    use lib './bin/';
    

提交回复
热议问题