in reply to using perl installed in another computer

To be honest, perl is somewhat designed for this. First question is what platform this is.

Windows: Have everyone "net use" a shared drive as the same drive letter. Update Config.pm such that it points to this drive letter (this is important for "use diagnostics" to work). Done.

Unix/Linux: Same idea, except using NFS or some other shared disk technology (AFS, DFS, SAN, NAS, etc.). Here you may be compiling from scratch, and Configure.sh actually has an option to pay attention to for setting this up during compilation. If you're compiling your own, then Config.pm will already be set up properly.

Either way, remote access to perl makes it easier to manage, but does also make it slower, and, depending on the sharing technology (SMB, NFS), can also make it less reliable.

  • Comment on Re: using perl installed in another computer

Replies are listed 'Best First'.
Re^2: using perl installed in another computer
by Anonymous Monk on Mar 31, 2005 at 04:30 UTC
    Hello,

    The OS that I am using in Windows. Could you please give me more details on why all the remote computers would need to net use the same drive letter. Also, please tell me what I need to change on config.pm.

    Thanks

      The reason for all the machines to see perl as installed in the same location is so that you can update Config.pm. (I realise that case is unimportant on Windows, but I like to use the Unix case since it works everywhere.)

      If the values in Config.pm are incorrect, then diagnostics won't work, and I'd imagine there may be other modules that may not work, although I haven't yet hit upon them (because I use diagnostics, I already have Config.pm fixed everywhere, so I wouldn't see further problems).

      Just scan through your Config.pm (the one in your lib directory) for where you have perl already installed, and change those instances of the directory to the new directory, and you're all set.

        Hello,

        Thanks for the reply. So, each remote computer would need a perl installed? Since the config.pm file exists in C:\Perl\lib directory as you had mentioned.

        Also, the following variables seem to need changing to the drive the main computer is mapped to. Please let me know if I am missing anything:

        archlibexp='C:\Perl\lib' installarchlib='C:\Perl\lib' installprivlib='C:\Perl\lib' libpth='"C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\L +ib\" "C:\Perl\lib\CORE"' prefix='C:\Perl' privlibexp='C:\Perl\lib' archlib='C:\Perl\lib' bin='C:\Perl\bin' binexp='C:\Perl\bin' sitearch='C:\Perl\site\lib' sitearchexp='C:\Perl\site\lib' sitebin='C:\Perl\site\bin' sitebinexp='C:\Perl\site\bin' sitelib='C:\Perl\site\lib' sitelib_stem='' sitelibexp='C:\Perl\site\lib' siteprefix='C:\Perl\site' siteprefixexp='C:\Perl\site' perlpath='C:\Perl\bin\perl.exe'

        Thanks.

        Actually, case is extremely important on Windows. While the file system is case-insensitive, perl is not. This can cause strange errors that can be hard to diagnose.

        If you have a windows box handy, try the following:

        use Strict; # use strict; my $val = 5000; $va1++; # no "Global symbol..." error here print $va1;
        or On a unix system, perl would complain loudly that it "can't find Strict.pm in @INC". Windows will quietly load strict.pm instead of Strict.pm, and then mysteriously fail to catch a minor typo.

        Another variation:

        use lwp::simple; # not LWP::Simple getprint 'http://yahoo.com'; # (Do you need to predeclare getprint?)
        Of course, you probably already know this, but I hope this keeps someone else from being tripped up by it.