这是我的项目:
assembler/
asm.pl # Main entry point
instructions.pm
support.pm
build.sh
---- assembler/asm.pl ----
...
use instructions;
...
---- assembler/instructions.pm ----
...
use support;
...
我希望build.sh
包含如下一行:
perl assembler/asm.pl $1
尝试使用相关模块时asm.pl
,找不到它们。这条线有效,但感觉肮脏和可耻:
cd assembler; perl asm.pl ../$1; cd ..
正确的执行方式是asm.pl
什么?我希望直接从任何其他任意位置执行位于文件系统上任何位置的程序,例如
$ cd /some/dumb/path
$ /path/to/the/project/build.sh /another/goofy/path.asm