princepawn has asked for the wisdom of the Perl Monks concerning the following question:

In order to package my multi-file Perl release for customers, it would be nice if I could ship them one file that "untarred" itself into a directory so that my Unix and Windows customers could both do the same thing.

Has anyone taken a stab at this under Perl yet?

  • Comment on Self-Extracting Architecture-Independant Perl Archives?

Replies are listed 'Best First'.
Re: Self-Extracting Architecture-Independant Perl Archives?
by jptxs (Curate) on Sep 29, 2000 at 18:58 UTC

    The trick here wouldn't so much be the 'untarring' part, since you could use tar.gz and both Unix and Windows users (with WinZip) could extract it.

    Maybe what you could do is create an archive containing another archive with the main program in it and a Perl script wich will interactively install the other archive to a directory of the users choice. This would actually work well too, because you could have the script check the environemtn, permissions and module availability on the machine as well. It's an extra step, but no worse than downloading any install files and then running the installer/rpm/etc.

    -- I'm a solipsist, and so is everyone else. (think about it)

(dchetlin: Link from Deja on self-extraction)Re: Self-Extracting Architecture-Independant Perl Archives?
by dchetlin (Friar) on Sep 30, 2000 at 04:19 UTC
    See this clpm post from Jonathan Stowe. I personally am not a big fan of the self-extraction paradigm, but whatever floats your boat.

    (Found by searching on "self-extracting Perl archive" on deja)

    -dlc

Re: Self-Extracting Architecture-Independant Perl Archives?
by AgentM (Curate) on Sep 29, 2000 at 19:12 UTC
    hmm...you should consider whether or not you want to uphold the <9 char filenames. It used to be an issue some years ago...But if your package consists of modules ONLY, then the preferred way is tar.gz the directory whose name should be the name of the module. Inside the directory are the modules including the dirname.pm. But I'm assuming your're interested more in a large app that you want to throw together for the user. In that case, you'll have to consider whether or not you want to throw your modules into the /perl/lib dir wherever it is. (That is easily obtainable by using the first dirname in the @INC or some %Config def.) Then, you should establish some system of installation. Where should the executable (main script) be? A possibly useful module for larger projects will be ExtUtils::MakeMaker. guess what it does...
    AgentM Systems or Nasca Enterprises is not responsible for the comments made by AgentM- anywhere.