Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   Using perl over network (NFS) (http://www.velocityreviews.com/forums/t885333-using-perl-over-network-nfs.html)

Alex F. 02-20-2004 07:54 AM

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

Joe Smith 02-20-2004 09:32 AM

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

Brian McCauley 02-24-2004 06:00 PM

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\\

Ben Morrow 02-24-2004 06:55 PM

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

Brian McCauley 02-25-2004 06:07 PM

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.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57