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

My 1st contribution to CPAN, the application SudokuTrainer, is soon leaving the TRIAL state and become a true disribution. So I want to document in README how to start it when a user has installed it into his perl installation.

On Windows I do this by simply saying "sudokutrainer" in any directory. I doubt whether it's as simple on Linux. It would be nice if someone could tell me how the correct shell command looks like on Linux.

Replies are listed 'Best First'.
Re: How start an application on Linux
by davido (Cardinal) on Jan 17, 2014 at 16:57 UTC

    Just document how the distribution's build configuration decides where to place the executable. Linux people will know how to proceed from there.


    Dave

      Thank you for your reply.

      Concluding from what happens on Windows with ActivePerl versus Strawberry Perl, it might be

      perl /path/to/your/perl/bin/sudokutrainer.pl

      or

      perl /path/to/your/perl/site/bin/sudokutrainer.pl

      I don't have access to Linux, so I cannot try out (using an already installed application) what will be correct. Hopefully you happen to know the answer.

        If you have a windows box, you can boot to Linux from an Ubuntu image on a thumb drive, or run it in Virtual Box, or set up dual-boot, or any of a number of other options. You might actually like it. ;)


        Dave

        A matter of taste ;-) But i think it should be installed in /usr/local/bin or perhaps /opt/bin.

        Keep in mind that it is always good practice to leave system Perl untouched.

        And IMHO you should have access to a Linux box and test the install routine also there.

        Please see also Filesystem_Hierarchy_Standard.

        Update:

        The paths you mentioned should be in the PATH environment variable under normal circumstances, as well as the ones i mentioned. So the user can say sudokutrainer.pl in his terminal and the app should launch.

        Best regards, Karl

        «The Crux of the Biscuit is the Apostrophe»

        Yes you do. Everyone has access to Linux

        Go here and download Virtual Box. Virtual Box will allow you to run an operating system inside of Windows without affecting the parent operating system.

        Once you have downloaded Virtual Box, you will need a Linux distribution. For a beginner I would recommend Ubuntu, but any flavor of Linux will work.

        Here's a few links to download Linux

        I've ordered them from lowest to highest learning curve. You should be able to plug the Ubuntu ISO into VBox and run it, while ArchLinux will require more work (there's no "installer" per se, and you'll need to set everything up manually).

        VirtualBox Documentation can be found here. You can probably just skip to Creating your first virtual machine

Re: How start an application on Linux
by choroba (Cardinal) on Jan 17, 2014 at 18:04 UTC
    If you do it the standard way, running just
    sudokutrainer.pl

    should work. I have more than 50 executables in ~/perl/bin installed by various CPAN modules.

    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

      Thanks to all of you for your kind help. In summary, I conclude that command sudokutrainer.pl is the best choice for Linux.

      BTW, on Windows the command sudokutrainer works because there is a batch script  sudokutrainer.bat created automatically in parallel to the Perl script  sudokutrainer.pl.

        In linux you can omit the extension, so just 'sudokutrainer' or sudoku-t or something like this is in fact a better choice to type (sorry, 'sudoku', 'sudo' and 'su' are already caught). Shorter is better

        to start an executable in a terminal you can simply open a terminal, go to the directory and wrote:

        dot-slash-executablename

        $ ./sudokutrainer

        Is the easier way. You can put the program in some place like /usr/local/bin also, export the path, and avoid the need to wrote dot-slash, (you are just saving to type two characters). Of course you need to specify before that the program is executable by "everybody" with:

        # chmod a+x sudokutrainer
Re: How start an application on Linux
by DrHyde (Prior) on Jan 21, 2014 at 11:57 UTC
    In your Makefile.PL, change the \\ to / and it should Just Work.