Subject: | Binary safety |
With perl>=5.16 Module::Load needs to strip binary unsafe packagenames and fix error reporting.
perl -MModule::Load -le'load "strict\0payload"; print for keys %INC'
dies with "Can't locate strict in @INC"
=> "Can't locate strict\0payload in @INC"
Wrong and misleading error message.
perl -MModule::Load -le'load "strict.pm\0payload"; print for keys %INC'
load fails, but it puts strict.pm\0payload into %INC even it could not be loaded.
=>
strict.pm
File/Spec.pm
Module/Load.pm
XSLoader.pm
constant.pm
File/Spec/Unix.pm
warnings.pm
strict.pmpayload
vars.pm
warnings/register.pm
DynaLoader.pm
Config.pm
Partly because perl require is broken upstream. Since p5p refuses to fix this bug at least the loaders need to do it correctly.
$ blead -MModule::Load -le'require "strict.pm\0payload" and print for keys %INC'
Module/Load.pm
vars.pm
strict.pm
constant.pm
DynaLoader.pm
warnings/register.pm
File/Spec/Unix.pm
Config.pm
XSLoader.pm
File/Spec.pm
warnings.pm