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

While mulling projects to do for myself to keep my brain in working Perl order I came up with just making a few scripts that would be easy to hand out to friends for them to use on their sites. However most of my friends have no idea on how to install a script let alone how to install a module if its a required dependency for the script to work. Which would be better? To explain how and where to download the dependency and how to install it if they didn't have access to a shell account or to program it all inclusively like one of Matt's Scripts and risk security?

When wishing to provide ease of use, what would you do?

BMaximus

Replies are listed 'Best First'.
Re: Programing stand alone CGI.
by logan (Curate) on Jun 21, 2003 at 04:59 UTC
    One thing has made itself crystal clear to me over the years: you cannot force a person to think. I went through this at work recently. One of my co-workers wanted to use my scripts, but wouldn't install the modules, or even read the step-by-step instructions (including cut-and-paste commands) on how to do so.

    If your friends want to use your scripts, they need to install the modules. If they don't want to go to all the long, hard work of ftping a few k of data from a public web site and typing 5 commands (gunzip, tar, make, make test, make install) to make their websites run better, forget it.

    I'd say include a README with your script telling them to download the required modules from CPAN, and include URLs. Mention that installation instructions for the indvidual modules will come with. Honestly, there's not much more you can do short of building their site for them.

    -Logan
    "What do I want? I'm an American. I want more."

Re: Programing stand alone CGI.
by kutsu (Priest) on Jun 20, 2003 at 21:02 UTC

    Since this is for friends, and if the friends are willing to learn, I'd recommend you try teaching them how to install the modules for your script, they learn a new skill while you get to practice explaining technical stuff to nontechnical people. If you one day want to allow others to use these scripts or the scripts are small and only do basic stuff, then you may want to make it all inclusive.

    "Pain is weakness leaving the body, I find myself in pain everyday" -me

Re: Programing stand alone CGI.
by nite_man (Deacon) on Jun 21, 2003 at 08:01 UTC

    In my mind, it will be better to develop an install utility which will check all dependecy and install needed modules on computer.

    A month ago I started to customize Request Tracker. This application is full Perl developed. It has excellent architecture and implementation. Also, this application needs many modules which need another modules. And RT's developers builded nice install utilities which check all needed modules and install them from CPAN.

    I think, that it's better than teach people how to configure your application and install modules from CPAN.

    Of course, you can write a good and full README which includes all needed information about install of your application. But this is another story...

          
    --------------------------------
    SV* sv_bless(SV* sv, HV* stash);
    
Re: Programing stand alone CGI.
by Anonymous Monk on Jun 20, 2003 at 21:48 UTC

    Include your script along with pure perl modules in a single package. If they want it to run faster, teach them how to install modules.

Re: Programing stand alone CGI.
by DrHyde (Prior) on Jun 21, 2003 at 20:07 UTC
    Going the all-inclusive route and putting all the code in one file is not in and of itself a security risk. The trouble with Matt's scripts is that they're just badly designed and badly written. Take a look at NMS for fixed versions of them. Those scripts only use modules that are part of the standard distribution, and are designed to work with perl 5.004 and upwards.