Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Why Tkx? And will Tk endure?

by aplonis (Pilgrim)
on Apr 19, 2010 at 20:58 UTC ( [id://835593]=perlquestion: print w/replies, xml ) Need Help??

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

My use of Perl is sporadic. I'll use it a lot for a month or two then not at all for months on end. This has left me out of date on new things Perlish. Thus it was a shock to install ActiveState on a new PC only to find no Tk but only Tkx in the PPM list. And here behind the company firewall I can't do CPAN.

I search around to find what is the deal. But it's hard to google or even search PerlMonks when one keyword is a subset of the other. I get long lists that don't hold comparisons, or explanations as to why the one or what is to become of the other.

Am I wrong to fear that all my trusty Perl/Tk apps with the nice balloons and other touches will have to be extensively re-coded over the coming years? I've written myself a nice helper module that makes complex Tk widgets easy to write. I like it a lot...

Tk::EasyGUI.pm

...but of course, I'm biased.

Is my distress unjustified? Will Tk endure? I've been of half a mind to switch to Python or maybe even look into something totally different like Haskell... Trusty Tk has been the anchor that I clung to for not doing that up until now.

Can anyone point me to relevant articles saying what is the future of plain old Tk?

Replies are listed 'Best First'.
Re: Why Tkx? And will Tk endure?
by Marshall (Canon) on Apr 19, 2010 at 21:23 UTC
    Yes, Tk is still available! It came bundled with ActiveState Perl 5.8.8, but now you need to get it separately from ActiveState, go here to find out how to get without using ppm: how to get Tk on AS Perl 5.10 I don't think anything is going to happen for Tk in terms of new features, but I still use it as it has all I need for now.

    update: looked a bit closer at this thread from AS - don't try to build it like one person in thread is trying, get the right .ppd file using another machine that can FTP. Transfer file with "sneaker net" or whatever to your internal machine. At command prompt type ppm -help, you will see that ppm install can take .ppd file as a parameter.

      Thank's for the info. The thing I liked best about regular Tk is that programs I wrote years ago originally on NetBSD at home and which worked unchanged also on Win2K at work...those same programs still work fine today, totally unchanged even after I have since switched from NetBSD to Ubuntu at home and have gone from Win2K through WinXP to Vista at work.

      What with Win7 looming on the horizon, the idea of having to co-develop all those Perl/Tk scripts yet again for Tkx so as to work on both systems... Well, the prospect is daunting enough as to make me think about just starting over with something totally new. Guess I don't have to do that for a while yet. Whew! Thanks again.

        Not sure why Tk was removed from the ActivePerl install (as of 5.10), but Perl/Tk development is very much active.

        You can get Perl/Tk without using ppm over the internet. Just download the module from CPAN, unzip it (I use WinRar cause it supports almost everything) then copy the files/folders for the perl modules into your perl\site\lib directory.

        Does Tkx support threading? If so that may one of the reasons.

        I have coded Perl/Tk on Win7 without any issues.

Re: Why Tkx? And will Tk endure?
by aplonis (Pilgrim) on Apr 20, 2010 at 18:54 UTC

    Tangentally, just a bit ago I tried installing Perl/Tkx via CPAN on my Ubuntu Karmic Koala box at home. No luck. It failed.

    Went into the Synaptic utility there and found both Tcl and it's Tk were installed by default, being basic to Ubuntu...since I certainly did not seek them myself.

    The thing is, old Perl/Tk worked just fine on both systems. And that is the main reason I have always really, really liked Perl. It would sometimes take a little bit of trial and error, but I could always make the scripts I wrote...the exact same script...work on every OS that I used. The number of hoops I had to jump through to make that happen were rather few. Only a one fairly harrowing instance leaps immediately to mind...the issue with fork. But I got around even that with only a very few extra lines.

    But in all those apps which I have supplied a Tk GUI, that part alone accounts for a great many lines of code. If I have to split that into different versions...what a bother it would be. Maybe too much of a bother to even bother (pun intended).

    So...do I misapprehend? Is Tkx not supposed to install also on Linux, et al? Or should I be looking for something amiss on my Karmic Koala box?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-04-20 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found