How do I best handle a needed patch for Perl/Tk?
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 fo开发者_运维问答r 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?
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.
精彩评论