>> Dynaloader.pm contains a bunch of $^O checks and many >> my $ext=".dll"; >> $filename = "blablalba$ext"; >> >> When I do factoring out all of these, I get much lighter and still perfectly >> working dynaloader. >> >> Why should my Win32 installation always check whether I am on VMS, MacOS or >> Linux? (and vice versa) >> >> I will be happy to propose proper patch improving situation (not only >> Dynaloader suffers), but will it be approved as a good idea by comunity? >> (afraid of dont-fix-it-aint-broken stuff)
HMB> FWIW I'm in favour. here it go. Test on Win32 pass. Test on Linux will do within couple of days. I cannot do tests on VMS, MacOS, OS2, but there should be nothing broken. (it is still possible to temporarily lie about $^O and at least check whether there will be syntax errors in generated Dynaloader.pm) Additionally, I dare to ask community to allow me to remove AUTOLOAD mechanic for Dynaloader, because IMHO it makes things a bit heavier and a bit more complex without good gain. Also, I dare to ask removing from Dynaloader_pm.PL following lines: ====== # The following require can't be removed during maintenance # releases, sadly, because of the risk of buggy code that does # require Carp; Carp::croak "..."; without brackets dying # if Carp hasn't been loaded in earlier compile time. :-( # We'll let those bugs get found on the development track. require Carp if $] < 5.00450; =========== The reason is simple: as core library modules do not support *that* old perl. Because even Config.pm uses 5.6.0 syntax (our) So elder perls will not allow checking for version because Config.pm will not compile. Best regards, Vadim.
DynaLoader_pm.PL.diff
Description: Binary data
