Requiring a File in Subroutine

Normally you have a simple...
require "$require_file";

However, I use a subroutine to require my files such as...

&require_supporting_libraries (, '/home/account/folder/folder/my.setup');

By doing so, the following two problems exist...

1. OptiPerl doesn't show the require in the "Subroutine uses" Requires listing.

That's important, but not as important as...

2. Since the script will ultimately reside on a Linux server, but development is being done on a Windows XP machine, the paths are different. Of course I can change the path, but there are several of these subroutine calls as well as I like to send it to the Linux server at the end of the day to double check everything.

My question is, can OptiPerl recognize or change a file reference when I click "Run in Internal Browser" as currently it displays...
"I am unable to require [said file above]" (This error message is of course generated by my &require_supporting_libraries subroutine.

Thanks,
Roger

Answer:
There is a special section in the help file devoted exactly to this topic. Please read "advanced issues / Using absolute paths". Generally you can do one of the following:

1) use version converter remarks to swap between two versions when uploading or

2) Actually put all the files in /home/account/folder/folder/my.setup on the XP machine, by using the subst command.

More information is in the manual.

31.07.2003. 21:31

This article hasn't been commented yet.

Write a comment

:

:

:


9 + 9 =