![]() |
Using perl over network (NFS)
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 |
Re: Using perl over network (NFS)
Alex F. wrote:
> 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 |
Re: Using perl over network (NFS)
v2af@yahoo.de (Alex F.) writes:
> 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\\ |
Re: Using perl over network (NFS)
Brian McCauley <nobull@mail.com> wrote: > v2af@yahoo.de (Alex F.) writes: > > > 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 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 -- "The Earth is degenerating these days. Bribery and corruption abound. Children no longer mind their parents, every man wants to write a book, and it is evident that the end of the world is fast approaching." -Assyrian stone tablet, c.2800 BC ben@morrow.me.uk |
Re: Using perl over network (NFS)
Ben Morrow <usenet@morrow.me.uk> writes:
> Brian McCauley <nobull@mail.com> wrote: > > > 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. 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. > > 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. 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\\ |
| All times are GMT. The time now is 04:47 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.