Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

which perl gui toolkit to use?

by redss (Monk)
on Feb 15, 2005 at 12:26 UTC ( [id://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 (Patriarch) 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"?

      thanks!

        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

        Like:

        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: http://search.cpan.org/src/MBARBON/Wx-0.22/docs/install.txt

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

    hth,phay

    Ordinary morality is for ordinary people. -- Aleister Crowley

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-03-29 12:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found