[dev] searching for tkkit.dll
[email protected] ("Konovalov, Vadim") Mon, 14 Mar 2016 18:41:53 +0000
| Newsgroups | perl.tcltk |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Please notice recent addition to githib.com/gisle/tcl.pm bebe163
https://github.com/gisle/tcl.pm/commit/bebe163d3773784062b63323d96a923eee272ba5
Tcl.pm is not going to seek for tkkit.dll in $path anymore, mostly because it appears to 1) always re-quire Config, which I was very much eager to avoid in general case and only use if nothing more left to do.
Config.pm is the waste of CPU ticks.
But most important is 2) that it could happen to be faced sooner than correct DLL, which also required to be non-movable and impossible to PAR and - what most important - 0+) - is of about more restrictive License.
This module which wants to make tkkit.dll usable from Tcl must include these lines before of "use Tcl;" line
sub Tcl::seek_tkkit {
unless ($DL_PATH) {
require Config;
for my $inc (@INC) {
my $tkkit = "$inc/auto/Tcl/tkkit.$Config::Config{so}";
if (-f $tkkit) {
$DL_PATH = $tkkit;
last;
}
}
}
}
I left a hook in Tcl.pm for this:
seek_tkkit() if defined &seek_tkkit;
Regards,
Vadim.