in reply to making tcl.pm and Tcl movable

Sorry I have problems to understand what you mean with "movable"

Moving to other directory on same filesystem or other host?

It would certainly help to reproduce your problem.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Replies are listed 'Best First'.
Re^2: making tcl.pm and Tcl movable
by Anonymous Monk on Nov 17, 2018 at 18:05 UTC

    the description I have is that they need to ship a perl script to several machines (Mac). The script calls TCL through tcl.pm which is going to be shipped too (I guess Perl and tcl.pm will be packed with PAR or something similar, executable and Tcl in a zip file). Also, they will pack alTcl and need the script to call that precise binary of Tcl and no others.

    I have tryed to understand the logic behind tcl.pm, as far as the linking to Tcl is concerned, but without much success. It works out of the box for the local Tcl installation it finds when it is installed, but I fail to twik it completely. Hope it is more clear what I am trying to achieve. With Tkx.pm it seems to be possible to pass at run time the location of Tcl that a Perl script should be used. Tcl.pm doesn't seem to allow the same, nor the hardcoding of a particular location relative to itself (with the goal of having my packed script a Tcl in a directory and move it around, from machine to machine and so on).

      My Par, TK and Mac foo is limited, so I will not be able to help you, sorry ...

      > the description I have ... I guess Perl and tcl.pm will ... they will pack

      ... but what I can say is that your description is very vague cause it seems you don't even know what your client exactly wants and does. (It sounds almost like you are trying to apply to a job offer from the internet. ;-)

      A reproducible problem description would greatly increase the probability to get help here.

      HTH!

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

        Actually the task is very simple: my department needs to deploy on 50+ macOS laptops a script that needs to call Tcl. This script needs to run in a nutshell, with its own Perl and Tcl version (I know that both are already present on any macOS, but not the desired versions). They do not want to install on all machines Tcl, tcl.pm, and Perl. My task: pack the Perl script + Perl into an executable (which I can do with zero problems with PAR or pp). My problem is to link the script/executable to the Tcl version I will put together with the executable, all packed in a zip file, on the target machines. In the target computer: unpack the zip and run the executable. Inside the zip file:

        • executable
        • Tcl binaries

        The problems I have is to link to these Tcl binaries.

        No matter what I try, the executable in the target machines is always linked to the standard Tcl distribution, not the one inside the zip). I tried to install tcl.pm against my Tcl binaries. It works, but as soon as I 'move' around my folder with executable+Tcl, it stops to work, since Tcl is no more in sight of the module. I tried with the ENV variable, as pointed out above and in some forum about Tkx, but could not reach any success. Any suggestion would be very much appreciated.

      Tkx depends directly on tcl.pm