Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Term::Cap or Perl::GTK or Perl::Tk

by deprecated (Priest)
on Jan 08, 2001 at 21:08 UTC ( #50509=perlquestion: print w/replies, xml ) Need Help??
deprecated has asked for the wisdom of the Perl Monks concerning the following question:

I'd like to see a tutorial on Term::Cap or Perl::GTK or Perl::Tk because as my programs mature, user interfaces become more important. However, I am kind of stuck with the Term::Cap interface and I would like some example code from which to start.

i am not cool enough to have a signature.

Replies are listed 'Best First'.
Re: Term::Cap or Perl::GTK or Perl::Tk
by ichimunki (Priest) on Jan 08, 2001 at 21:14 UTC
    Tk is very good, imho. It has a widget demo, just type "widget" at a command line and you'll be learning the module in no time (it shows examples of the widgets in action with convenient source display). Nancy Walsh's O'Reilly book is also pretty good. has recently run a couple of Gtk tutorials, if memory serves.
      Widget (n) - base class for mega-widgets within a frame

      it would appear that I have some of the components installed that you think I might (the above from `whatis widget`), and I have a manpage. As I recall (from the Coriolis book) Perl::Tk is an interface to tcl. The source on the widget manpage is written, i gather tcl, but it doesnt mention. Is it possible that I dont have a working tcl installed or something? I would like to avoid Gtk+ because of its, er, crummy implementation in programs like Gnapster.

      I was hoping to start tinkering with it before buying the book, but I guess thats the last perl book I dont have except maybe the mod_perl book. sigh. do you know of any online Perl::Tk tutorials or of any programs that use it that I could hack around in?

      i am not cool enough to have a signature.

        I'm not sure about Tcl. I don't think you need that for Tk800. If you do a "install Tk" from the CPAN shell, you should be up and running (or similarly the Tk PPM from ActiveState) without anything additional. The Tk800 module includes the widget demo script.
Re: Term::Cap or Perl::GTK or Perl::Tk
by kschwab (Priest) on Jan 08, 2001 at 21:39 UTC
    Supposing that "kind of stuck with Term::Cap" means that you are stuck with a tty interface...

    You may want to have a look at Curses::Widgets and Curses::Forms. These would give you a higher level interface to a tty-based "gui", that would look and feel more similar to Tk and/or GTK.

    If this isn't the case, I highly recommend the Tk module. There's a book called "Learning Perl/Tk" that contains a tutorial. Also, as you requested, an on-line tutorial.

      Heh, by "stuck" I didnt mean "I am forced to use" I meant "I have tried it and perl complains at me and I dont understand why." :)

      thanks a lot for the tutorial.

      i am not cool enough to have a signature.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://50509]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2018-05-23 02:26 GMT
Find Nodes?
    Voting Booth?