Jeff Hobbs wrote:

>>>>If all else fails, please write
>>>>
>>>>if ($^O eq 'whatever') {
>>>>require 'Config.pm';
>>>># ... or
>>>>#     eval "use Config;"
>>>>}
>>>>        
>>>>
>>>If these are all functionally equivalent, then we can replace the 'use
>>>Config'.
>>>      
>>>
>>please do so.
>>
>>Otherwise all usages of Tcl.pm will read Config.pm, which is huge.
>>    
>>
>
>It actually isn't that huge.  There is a small stub, and larger parts are only
>brought in on use through AUTOLOAD.
>
>  
>

its huge in 5.8.2 and small stub in 5.8.8, so its size version dependant.

Anyway, better leave it truly optional.


>>The only distionction between 'use Config' and 'require Config.pm' are
>>1. compile/run-time distinction and 2. call of 'import' function; but
>>all these are negotiable for given $^O
>>    
>>
>
>OK, so I'm making the change and referring to s/$Config/$Config::Config/g.
>
>  
>

thanks

>>I hope this is doable via $ENV{PERL_TCL_DLL} or Tcl::DL_PATH 
>>variable(s)
>>    
>>
>
>I believe it is.  That is what we are doing in ActivePerl with Tcl+Tkx.  You
>can see this in action in 5.8.8.818:
>       http://downloads.activestate.com/ActivePerl/Windows/5.8/
>
>In particular, we locally patch it to insert the following in Tcl.pm:
>
>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;
>        }
>    }
>}
>
>and provide the tkkit prebundled.
>  
>

thanks for this interesting bit, I'll look closely into details, and
certainly will use this.


Vadim.


Reply via email to