Tcl Library Source Code

View Ticket
Login
Ticket UUID: 34a589f660c1f0bafb5b8963da4e200b2934f91b
Title: could not load ftpd in Tcl 9.0
Type: Bug Version: ftpd 1.4.1
Submitter: anonymous Created on: 2025-07-22 17:28:44
Subsystem: ftpd Assigned To:
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2025-07-22 17:39:14
Resolution: None Closed By: nobody
    Closed on:
Description:
In Tcl 8.6.16:
% package require ftpd
1.4.1

In Tcl 9.0.2:
% package require ftpd
can't read "tcl_platform(user)": no such variable
% namespace eval ::ftpd {variable contact;set contact "$::tcl_platform(user)@[info hostname]"}
% package require ftpd
1.4.1

From help of global:
This command has no effect unless executed in the context of a proc body.

With the following modification the script completes successfully:

--- ftpd.tcl.org        2024-10-24 18:47:54.000000000 +0900
+++ ftpd.tcl    2025-07-23 02:19:48.243683100 +0900
@@ -20,8 +20,7 @@

     variable contact
     if {![info exists contact]} {
-        global tcl_platform
-       set contact "$tcl_platform(user)@[info hostname]"
+       set contact "$::tcl_platform(user)@[info hostname]"
     }

     variable cwd
User Comments: oehhar added on 2025-07-22 17:39:14:
Yes, left-over of the 9.0 migration.
I suppose, you use TCL 9.0 ?

Thanks and sorry,
Harald