http://qs321.pair.com?node_id=121996


in reply to Automate Making Menus

CPAN is your friend and YAPPC, of course

There already is a perlmenu package thingy. I've used it for a couple of tty scripts, and it worked reasonably well. Easy to set up menus, and has all the features you could wish for: control chars for 'control', radio buttons, hierarchical menus, form fields, multi-page menus, etc etc.

It's ncurses based, and I checked the homepage, it can even be found on CPAN. Not updated since 1997, it seems, but it works. Check it out at perlmenu. It's quite easy to use.

To support the last statement, I could even use it before joining PM. That says something {grin}.

Cheers,

Jeroen
"We are not alone"(FZ)

Replies are listed 'Best First'.
Re: Re: Automate Making Menus
by staeryatz (Monk) on Oct 30, 2001 at 13:11 UTC
    Thanks.

    I downloaded it. Now it's just a matter of figuring out how to use it.

    Ncurses is pretty cool. Currently, I code in Unix shell + dialog
    if I want to make ncurses menus. Here's a look at one of them.

    Something I've used and abused in the above code is Perl's
    string multiplier 'x'. It comes in handy:
    print "=" x 80;

    Some languages don't have something so cool like that.
      Hanging around the monastry will learn you many more neat tricks. To name a few:
      1. use strict and warnigns and diagnostics or die
      2. lingual-like for/while/if/unless constructs, eg.
        print "I love perl ".$_++." times\n" while m/vroom/; print "Bwech" unless m/perl/ or not substr($^O, 'linux' );
      3. split (/tell chipmunk I did resist the temptation)
      4. eval
      5. .... and many others.
      Mehopes you will enjoy the wonders of perl!

      Jeroen
      "We are not alone"(FZ)

        Cool, thanks again.

        I guess it's obvious that I code in Perl like a 'C' Programmer.
        I'll definately pick up the traits of a Perl Programmer from hanging
        around here, something that some books just don't teach.

        I'm learning Perl from a 900 page book called "Mastering Perl 5",
        by Eric C. Herrmann. I'm about 2/3 through, it's okay but it can
        pretty dry at times. It teaches the methods of Kung-Fu, but not the
        art of Kung-Fu.

        The name of the book is misleading. You cannot be a "Master",
        without having style and grace.

        Now, let's see if I can Walk my Talk...