At 20|08 -0400 2002/04/10, Chris Nandor wrote: >At 00:10 +0100 2002.04.11, p kent wrote:
>have the same code there for the same reasons you want it in Getopt::Std, >and you wouldn't want to keep duplicating it, so you should have it in an >external module that could be used by any Getopt:: module. Sounds like you went to the same software engineering school as me. >this). Or more likely, I am using a script with Getopt::Std and want to >ignore all options, and this code would force interaction where I want good point: some programs are quite uninteractive, but some work with the user a lot more. Hmm, hard to do the right thing in all cases. I've just been using Mac::Controls, Mac::Quickdraw et al to produce a rather more MacOS-like version (i.e. you get a window with checkboxes for each switch), but I haven't been able to put a textedit field in the window (for entering options that have arguments). Maybe I should be constructing a dialog box, as opposed to a normal window. It's pretty amazing what you can do with a few lines of perl anyway. >You might also want to look into using Text::ParseWords::shellwords() to do >your parsing of the string. Aaaargh! That is _so_ annoying. I thought there'd be module to do this, but I couldn't see it in my lib directory, so I though "oh, must have seen it on CPAN". It looks (from the POD) that this does the right thing. P