What is the best way to handle the required patch for Perl / Tk?

I am making changes for Perl / Tk for an application that has its own resident Perl and install modules (so we can drop the application and go).

I found a problem that I am facing that I just stumbled upon what seems to me necessary here: http://osdir.com/ml/lang.perl.tk/2004-10/msg00030.html

     Bug confirmed.  Here 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) { --- 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) {  --- 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 would like to apply this patch, or if there is a new version of the Perl / Tk module that I can upgrade to, including this patch, which does not require changing the version of Perl, do it.

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

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

So..

1a), if there is a new version of Tk VERSION that includes a fix in the link above, how can I update only this module in a specific Perl installation location for this application?

1b) how to find out if this update is compatible with 5.8.4 Perl (I don't want to update perl at this point)

2) if not, how to apply this patch defined in this link?

+4
source share
1 answer

Check CPAN first to find out which current version of Tk . At the time of this answer, it is 804.028, so it is possible that your error is fixed. You can check the Tk bug queue to see the status of logged errors, although I don’t know if your particular has ever been queued. You can also check the Changes file for release to see if your problem is mentioned there.

If you don’t see anything specific, you may notice that the author of your quoted message is a Tk supporter, so this patch was probably applied. :)

Tk is the distribution. You cannot update individual modules.

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

If you absolutely need to apply only one change, download the source for your version of Tk, apply the patch and rebuild it.

+3
source

Source: https://habr.com/ru/post/1310554/


All Articles