Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

which perl gui toolkit to use?

by redss (Monk)
on Feb 15, 2005 at 12:26 UTC ( #431135=perlquestion: print w/replies, xml ) Need Help??

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

Hi Monks-

I want to write a very simple gui program for a system that does not have any of the perl gui tookits installed (ie. no tk/gtk/qt/wxwidgets). It runs KDE and has the native libraries, just not the perl interface libraries.

This system has a good perl 5.8.4 installation but Cpan does not work on this system, so I'd have to manually install all the perl modules.

Would it be much work to manually install one of these gui toolkit perl interfaces? I'm trying to figure out which would be the easiest for me to get installed (and I'd have to install the modules under my home directory also)

Replies are listed 'Best First'.
Re: which perl gui toolkit to use?
by BrowserUk (Pope) on Feb 15, 2005 at 12:56 UTC

    The big question here may be:"Why doesn't CPAN work?".

    That said, a very astute guy with respect to installing and building perl modules, once showed me how much quicker it is to use wget to fetch the tar.gz, and gunzip/tar to unpack it, then follow the usual 4 stanza blessing to build and install it. I never looked back.

    Whilst it's true that you have to work out any dependancies yourself, it still worked whenever CPAN or CPANPLUS wouldn't.

    Examine what is said, not who speaks.
    Silence betokens consent.
    Love the truth but pardon error.
      Most likely due to network restrictions, or certain helper software not available. CPAN has sometimes a hard time getting out of a firewall (which is sometimes caused by the person configuring CPAN not knowing what to answer to all the questions). Also, to get out, CPAN is geared towards LWP - which - *grumble* *grumble* isn't part of the core. And where getting out with LWP might be possible, it won't be possible with ftp, or whatever CPAN tries if LWP isn't there.

      But as you said, downloading it yourself and running perl Makefile.PL, make, make test, make install is fairly simple. I don't know about other GUIs, but Tk doesn't have dependencies. It takes a few minutes due to all the compiling, but installing Tk is simple. In fact, it's easier to install by hand than from CPAN - if you install from CPAN, you compile/test running as the same user you're going to install the modules with. And that's not necessary the same user as you're normally running under. Which, at least in my setup, means that the user making/testing Tk doesn't have permission to display widgets on the screen. Resulting in a test failure, and an aborted install.

      You should try installing Maypole on a virgin system with that approach. :-/

        I assume you mean that Maypole has a lot of dependancies and would therefore require a lot of work to install manually. But if CPAN doesn;t work for the simple case, it certainly won't work for the complex ones.

        The manual method may be tedious, but provided wget works, then the manual process will work.

        Examine what is said, not who speaks.
        Silence betokens consent.
        Love the truth but pardon error.
Re: which perl gui toolkit to use?
by zentara (Archbishop) on Feb 15, 2005 at 14:03 UTC
    Tk will be the easiest to get installed. It is about a 6 meg file, all self-contained, and is well tested to compile on many platforms. It dosn't require extra libs to be installed.

    Qt will require you to get a huge download for the qtlibs. Gtk2 requires 4 basic c-libs installed properly with pkconfig setup right, before you can install the perl module. It may install pretty easy for you, but gtk2 is a bit harder for a beginner to learn and use. Wx is a huge download also,requiring the large Wx c-libs, before the Wx-perl will install.

    If it is just a simple gui program you want to make, Tk is your answer.

    I'm not really a human, but I play one on earth. flash japh
      I was pretty sure Tk would be the winner. Ok I downloaded the Tk tarball and successfully ran make on it.

      Since I am installing this to a subdirectory under home, do you know which file contains the install directory that I have to update before running "make install"?


        I think you are asking how to tell it where to install in a home directory? If so use the "PREFIX" option to "perl Makefile.Pl" BEFORE you run make


        perl Makefile.PL PREFIX=/home/username/perl5lib

        I'm not really a human, but I play one on earth. flash japh
Re: which perl gui toolkit to use?
by phaylon (Curate) on Feb 15, 2005 at 12:57 UTC
    Most modules have installation instructions included with the module. See for example here:

    You can browse the files at CPAN by going to the package and select "Browse" at "This Release" on top.


    Ordinary morality is for ordinary people. -- Aleister Crowley

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://431135]
Approved by Arunbear
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2020-08-11 04:36 GMT
Find Nodes?
    Voting Booth?
    Which rocket would you take to Mars?

    Results (58 votes). Check out past polls.