Share

TclHttpd - Tcl Web Server

Tracker: Feature Requests

5 tclhttpd pollutes the global namespace - ID: 1354235
Last Update: Settings changed ( eviltwinskippy )

The tclhttpd code creates a lot of global variables and
procs in the global namespace. While this can be
acceptable in a standalone application it makes very
difficult embedding the httpd in an already existing
Tcl application. Think for example to the Config
variable which is very likely already used by the
application.

Good programming practice dictate that all procs and
variables in a package should be defined in the ::httpd
namespace and only those implementing the httpd API
be exported. Additionally access to the package
internal variables should be done only through the
official API.


Massimo Dal Zotto ( dizzi ) - 2005-11-11 17:51

5

Closed

None

Sean Woods

None

None

Public


Comment ( 1 )

Date: 2008-05-06 00:25
Sender: eviltwinskippy


While this is a lofty design goal, it is the opinion of this developer
that Tclhttpd is more or less intended to be the primary application
running inside of an interpreter. The task of removing all of the global
calls would require a major rewrite of the entire project.

You always have the option of banishing the webserver to a slave
interpreter.


Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
status_id Open 2008-05-06 00:25 eviltwinskippy
assigned_to nobody 2008-05-06 00:25 eviltwinskippy
close_date - 2008-05-06 00:25 eviltwinskippy
data_type 362884 2008-05-06 00:25 eviltwinskippy