in reply to Program design with GUI interface

my script utilities at $work all use this approach: they all start with
use Utl; # this is my module, where some 'magic' is hidden
and all these utilities are able to either accept arguments from the command line, or, when I specify --g then Tk GUI is displayed, allowing me to comfortably fill in the values.

If, for example, I specified --arg=value --g then in GUI that parameter will be initialized with that value, and user either agrees with it, or edit it.

Boolean values (checkboxes), file location values, list selection values and so on are supported.

Example screenshot.

I wonder should I CPANize it?

Replies are listed 'Best First'.
Re^2: Program design with GUI interface
by ww (Archbishop) on May 10, 2006 at 13:45 UTC
    If the code is as good as the GUI in your screen-shot, run; do not walk; to CPANize it!   ++
      Well, code isn't extremely good, because, as I started it for my own convenience, it grows from small helper subs into something resembling the module (and that was really convenient for me, personally).
      But even namespace was not choosen.

      Additionally, before flooding CPAN with yet another option parsing module, in addition to, say, http://search.cpan.org/~srezic/Tk-Getopt-0.49/, there should be good argumentation for this.

      If you're still interesting, I can factor some sh*t out, will show the code, and prepare for some kind of RFC in Meditations section.

      Do you have an idea how to name it, given screenshot? :)

Re^2: Program design with GUI interface
by ww (Archbishop) on May 11, 2006 at 13:29 UTC
    No great names to suggest, vkon, other than something quite obvious like
     
          Tk::Getopt::Util.

    But an RFC, with code (scrubbed for any personal data, naturally), may produce suggestions from those of great wisdom and help you smooth any rough spots you would like to polish.

    ...and speaking of "wisdom," check out zentara's response to the OP. I'm not well qualified to evaluate the recommendations, but I am convinced that zentara's observations are noteworthy.