Tcl Source Code

Artifact [f152815b17]
Login

Artifact f152815b170d9c7041924e63ad51074c8bf6dc12:

Attachment "None" to ticket [403529ffff] added by dgp 2001-02-01 02:02:20.
? package.patch
? solaris
? unix/httpd
Index: library/package.tcl
===================================================================
RCS file: /cvsroot/tcl/tcl/library/package.tcl,v
retrieving revision 1.16
diff -u -r1.16 package.tcl
--- library/package.tcl	2000/11/24 13:56:40	1.16
+++ library/package.tcl	2001/01/31 18:59:48
@@ -165,10 +165,23 @@
 	# Load into the child any packages currently loaded in the parent
 	# interpreter that match the -load pattern.
 
+	if {[string length $loadPat]} {
+	    if {$doVerbose} {
+		tclLog "currently loaded packages: '[info loaded]'"
+		tclLog "trying to load all packages matching $loadPat"
+	    }
+	    if {![llength [info loaded]]} {
+		tclLog "warning: no packages are currently loaded, nothing"
+		tclLog "can possibly match '$loadPat'"
+	    }
+	}
 	foreach pkg [info loaded] {
 	    if {! [string match $loadPat [lindex $pkg 1]]} {
 		continue
 	    }
+	    if {$doVerbose} {
+		tclLog "package [lindex $pkg 1] matches '$loadPat'"
+	    }
 	    if {[catch {
 		load [lindex $pkg 0] [lindex $pkg 1] $c
 	    } err]} {
@@ -345,9 +358,17 @@
 		tclLog "warning: error while $what $file: $msg"
 	    }
 	} else {
+	    set what [$c eval set ::tcl::debug]
+	    if {$doVerbose} {
+		tclLog "successful $what of $file"
+	    }
 	    set type [$c eval set ::tcl::type]
 	    set cmds [lsort [$c eval array names ::tcl::newCmds]]
 	    set pkgs [$c eval set ::tcl::newPkgs]
+	    if {$doVerbose} {
+		tclLog "commands provided were $cmds"
+		tclLog "packages provided were $pkgs"
+	    }
 	    if {[llength $pkgs] > 1} {
 		tclLog "warning: \"$file\" provides more than one package ($pkgs)"
 	    }