Using perl over network (NFS)

A

Alex F.

Dear all,

we have a PC-based server that works as a "perl-server" - that means
we only installed perl on that server and about 25 PCs run perl from
there without any problems (using TK and GD for example)...
- the only thing we did was setting the link (plus the search-path)
for perl-scripts to the remote server on every client.

Now we want to establish the same thing in another department that
uses HPUX11 -
we installed perl on one Unix-server and would like to run perl from
another Unix-machine...

If we try to do the same thing as on the PCs over NFS (Network File
System - on Unix) we get following error message:

user4@client3> /net/<server>/opt/perl/bin/perl tkmenu.pl
Can't locate Tk.pm in @INC (@INC contains:
/opt/perl/lib/5.6.1/PA-RISC1.1-thread-multi /opt/perl/lib/5.6.1
/opt/perl/lib/site_perl/5.
6.1/PA-RISC1.1-thread-multi /opt/perl/lib/site_perl/5.6.1
/opt/perl/lib/site_perl .) at tkmenu.pl line 5.
BEGIN failed--compilation aborted at tkmenu.pl line 5.

of course running this TK-script on the "server" works fine!
TK-modules are installed there... it seems that perl searches for the
modules on the local machine

Now we don´t know
- if did some mistakes
- if using perl on Unix isn´t that simple as on PCs


Thanx
Alex
 
J

Joe Smith

Alex said:
user4@client3> /net/<server>/opt/perl/bin/perl tkmenu.pl
Can't locate Tk.pm in @INC (@INC contains:
/opt/perl/lib/5.6.1/PA-RISC1.1-thread-multi /opt/perl/lib/5.6.1
/opt/perl/lib/site_perl/5.
6.1/PA-RISC1.1-thread-multi /opt/perl/lib/site_perl/5.6.1
/opt/perl/lib/site_perl .) at tkmenu.pl line 5.
BEGIN failed--compilation aborted at tkmenu.pl line 5.

Looks like you left out the obvious:
root@client3# ln -s /net/$server/opt/perl /opt/perl
user4@client3> set path=($path /opt/perl/bin)
user4@client3> perl tkmenu.pl

-Joe
 
B

Brian McCauley

Can't locate Tk.pm in @INC (@INC contains:
/opt/perl/lib/5.6.1/PA-RISC1.1-thread-multi /opt/perl/lib/5.6.1
/opt/perl/lib/site_perl/5.
6.1/PA-RISC1.1-thread-multi /opt/perl/lib/site_perl/5.6.1
/opt/perl/lib/site_perl .) at tkmenu.pl line 5.
BEGIN failed--compilation aborted at tkmenu.pl line 5.

of course running this TK-script on the "server" works fine!
TK-modules are installed there... it seems that perl searches for the
modules on the local machine

In Unix the default @INC is set at compile time.

In Windows it's derived from $^X

That's because in Unix you can't get the name of the current
executable.
- if using perl on Unix isn´t that simple as on PCs

It is not PC to use "PC" to mean "Windows box". :)

--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
 
B

Ben Morrow

Brian McCauley said:
In Unix the default @INC is set at compile time.

In Windows it's derived from $^X

AS Perl will also try to take it out of the registry, if it's there.
That's because in Unix you can't get the name of the current
executable.

s/(Unix)/some $1es/;
Many have something equivalent to Linux' /proc/self/exe, which perl will
use to set $^X if it exists.

Ben
 
B

Brian McCauley

Ben Morrow said:
AS Perl will also try to take it out of the registry, if it's there.

Does it? I didn't think you could change the default @INC by playing
with the registry. You can add additional directorties but not get
rid of the default ones.
s/(Unix)/some $1es/;
Many have something equivalent to Linux' /proc/self/exe, which perl will
use to set $^X if it exists.

Ah, so in that case there could be a compile-time option to make the
default @INC be derived from $^X.

--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top