Using perl over network (NFS)

Discussion in 'Perl Misc' started by Alex F., Feb 20, 2004.

  1. Alex F.

    Alex F. Guest

    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
    Alex F., Feb 20, 2004
    #1
    1. Advertising

  2. Alex F.

    Joe Smith Guest

    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
    Joe Smith, Feb 20, 2004
    #2
    1. Advertising

  3. (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\\
    Brian McCauley, Feb 24, 2004
    #3
  4. Alex F.

    Ben Morrow Guest

    Brian McCauley <> wrote:
    > (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, Feb 24, 2004
    #4
  5. Ben Morrow <> writes:

    > Brian McCauley <> 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\\
    Brian McCauley, Feb 25, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ashok
    Replies:
    1
    Views:
    379
    Jeff McNeil
    Sep 23, 2009
  2. Martin DeMello

    inotify over nfs

    Martin DeMello, Nov 22, 2006, in forum: Ruby
    Replies:
    4
    Views:
    779
    Martin DeMello
    Nov 22, 2006
  3. Hal Vaughan
    Replies:
    0
    Views:
    588
    Hal Vaughan
    Sep 12, 2005
  4. Replies:
    2
    Views:
    190
    Big and Blue
    Nov 2, 2006
  5. Rahul
    Replies:
    8
    Views:
    399
    Rahul
    Feb 11, 2009
Loading...

Share This Page