Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Okay, maybe we do need a guide of how to write a module properly so it can be automatically installed.

    I have an install script that installs all them modules I need at work and I do run into the same kind of problems.

    Interactive modules are a pain. But what do we do about it?

    • By default don't ask questions? Not very userfriendly. What should we do about optional features?
    • time out after a few seconds of inactivitly (easy to implement for all concerned, but a pain in the rear if I'm not watching my computer like a hawk and I need to change some options)
    • Have an eviromental variable that can be set to provide data or say "accept all defaults" (the Template Toolkit way)
    • Have some form of config script that you can edit?
    I was thinking the other day about writing a module based on Gravel. Now, as you know, gravel is a C module you can download and install from source from sourceforge. Now, if you've got LWP installed then I can download and install that for you (assuming you have a real computer with a real compiler installed)

    Now the interesting questions:

    • Should I download it? What if it's already installed and I can't just find the header files for some reason. Should I ask now?
    • Should I ask before downloading? What if you're not online?
    • Is LWP a dependancy of this module, or is the ebuild (words I don't understand) of gravel a dependacy? Or both? Or one or the other?
    See, it all gets really complicated really quickly.
    • Well, I'm not going to try and change the world this week. I appreciate that it's not all as simple as it first seems, but what I'm going to concentrate on is getting CPAN in Gentoo. I already have a couple of workarounds and dependency additions etc., so I'm going to hack and slash until it all just works ;-)

      After I've done that, we can go back and decide what would have made things easier for me and what the best solution might be. Of course, most talk about CPAN is just that - we need to get the module
    • Interactive modules are a pain. But what do we do about it? By default don't ask questions? Not very userfriendly. What should we do about optional features?

      Why, command line options to "perl Makefile.PL", of course. Of course? Eh, the concept is there. I don't know how extensible it is, to use your own command line options.