4

I am making a change to Perl/Tk for an application that has its own resident Perl and modules installation (so we can drop the app in and go).

I've found a problem I am experiencing that I just stumbled on what seems to be the patch I need here: http://osdir.com/ml/lang.perl.tk/2004-10/msg00030.html


    Bug confirmed. Here's the patch against Tk804.027:


--- Tk-804.027/pTk/mTk/generic/tkEntry.c Sat Mar 20 19:54:48 2004
+++ Tk-804.027-perl5.8.3d/pTk/mTk/generic/tkEntry.c Tue Oct 19 22:50:31 2004
@@ -3478,6 +3478,18 @@
Tcl_DStringFree(&script);
#else

+ switch (type) {
+ case VALIDATE_INSERT:
+ type = 1;
+ break;
+ case VALIDATE_DELETE:
+ type = 0;
+ break;
+ default:
+ type = -1;
+ break;
+ }
+
code = LangDoCallback(entryPtr->interp, entryPtr->validateCmd, 1, 5, "%s
%s %s %d %d",
new, change, entryPtr->string, index, type);
if (code != TCL_OK && code != TCL_RETURN) {


Regards,
Slaven

I'd like to apply this patch or if there is a newer version of the Perl/Tk module I can upgrade to that includes this patch already that doesn't require I change the version of Perl, do that.

Here is what I can find from the installation for this app:

perl -v = 5.8.4 $Tk::version = '8.4' $Tk::patchlevel = '8.4' $Tk::VERSION = '804.027'

So..

1a) if there is a newer Tk VERSION that includes the patch in the link above, how do I upgrade just that module in the specific Perl installation location for this app?

1b) how do I know if that upgrade is compatible with 5.8.4 of Perl (I don't want to upgrade perl at this point)

2) if not, how do I apply that patch defined in that link?

brian d foy
  • 129,424
  • 31
  • 207
  • 592
Streamline
  • 2,040
  • 4
  • 37
  • 56

1 Answers1

3

First, check CPAN to see what the current version of Tk is. At the time of this response, it's 804.028, so it's possible that your bug has been fixed. You can check the Tk bug queue to see the state of reported bugs, although I don't know if your specific one was ever entered in the queue. You can also check the Changes file for the release to see if your issue is mentioned there.

If you don't see anything specific, you might note that the author of your quoted message is the maintainer of Tk, so it's likely that the patch has been applied. :)

Tk is a distribution. You can't upgrade individual modules.

Check the Perl/Platform Version Matrix to see which versions of Tk work on which platforms and under what versions of Perl.

If you absolutely must apply just this one change, download the source for the version of Tk you're using, apply the patch, and rebuild it.

Michael Carman
  • 30,628
  • 10
  • 74
  • 122
  • Michael, thanks for the comments. How would I upgrade the Tk distribution from 804.027 to 804.028 if it is included? If it is not and I want just the patch, how do I do what you are suggesting in the last sentence? What the steps? – Streamline May 21 '10 at 21:53
  • If you're running ActivePerl, use the `ppm` utility that ships with it. Otherwise, try the `cpan` shell. If all else fails, download the distro, unzip it, and do the `make`, `make test`, `make install` dance. – Michael Carman May 22 '10 at 01:49