我如何最好地处理 Perl/Tk 所需的补丁?

发布于 2024-09-02 15:35:25 字数 1266 浏览 2 评论 0 原文

我正在对 Perl/Tk 进行更改,以获得一个具有自己的常驻 Perl 和模块安装的应用程序(这样我们就可以将应用程序放入并运行)。

我发现我遇到的一个问题是我偶然发现了我在这里需要的补丁: 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

我想应用此补丁,或者如果有我可以升级到较新版本的 Perl/Tk 模块,其中已经包含此补丁,不需要我更改 Perl 的版本,就这样做。

以下是我可以从该应用程序的安装中找到的内容:

perl -v = 5.8.4 $Tk::版本 = '8.4' $Tk::补丁级别 = '8.4' $Tk::VERSION = '804.027'

所以..

1a) 如果有一个较新的 Tk 版本包含上面链接中的补丁,我如何升级该应用程序的特定 Perl 安装位置中的该模块?

1b) 我如何知道该升级是否与 Perl 5.8.4 兼容(此时我不想升级 perl)

2) 如果不兼容,我如何应用该链接中定义的补丁?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

回心转意 2024-09-09 15:35:25

首先,检查 CPAN 以了解 Tk 是。在此响应时,它是 804.028,因此您的错误可能已得到修复。您可以检查 Tk bug 队列 以查看报告了错误,尽管我不知道您的特定错误是否已进入队列。您还可以检查该版本的更改文件,看看您的那里提到了问题。

如果您没有看到任何具体内容,您可能会注意到引用消息的作者是 Tk 的维护者,因此很可能已应用该补丁。 :)

Tk 是一个发行版。您无法升级单个模块。

检查 Perl/平台版本矩阵 以了解哪些版本的 Tk 在哪些平台上运行以及在什么版本的 Perl 下。

如果您绝对必须仅应用这一更改,请下载您正在使用的 Tk 版本的源代码,应用补丁并重新构建它。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文