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

I am trying to make a simple menu-driven perl application. I've done this without the use of any extra modules by just printing lines, reading input, and using a switch to call subs based on which number you entered. This works, but of course everything just scrolls and scrolls and looks pretty bad.

I'd like, instead, to use Curses to build menus, sub-menus, etc. I found the Curses::UI module which gives you an easy way to do lot's of cool things, but I don't see a "menu" widget, other than a top menu bar. Is there no module to simplify the creation of menus that execute subs or show sub-menus?? This seems like it must exist...

Replies are listed 'Best First'.
Re: Curses menus
by oko1 (Deacon) on Jan 12, 2012 at 03:43 UTC

    Or you could try Term::Menu::Hierarchical. Not to toot my own horn or anything, but it works pretty well. :)

    -- 
    Education is not the filling of a pail, but the lighting of a fire.
     -- W. B. Yeats
      Thanks, that looks pretty good. I also found, and am using perlmenu: http://www.public.iastate.edu/~skunz/PerlMenu/homepage.html
Re: Curses menus
by Anonymous Monk on Jan 12, 2012 at 02:24 UTC
      Quoted from my question: "other than a top menu-bar". Pretty clearly implying that a menu-bar across the top is not what I am looking for. Thanks for playing.

        Quoted from my question: "other than a top menu-bar". Pretty clearly implying that a menu-bar across the top is not what I am looking for. Thanks for playing.

        Seriously? Curses::UI::Popupmenu is not a menu-bar