Packing (PAR::Packer) the following script
binmode STDOUT, ":encoding(UTF-8)";
results in
Unknown PerlIO layer "encoding" at script/foo.pl line 5.
Reason: ":encoding(UTF-8)" is recognized by M::SD
(cf. line ~915 in scan_chunk), but has no consequence, because
UTF-8 isn't handled by an "external" encoding module.
It also fails to include Encode.pm which is needed at script runtime
as well.
Solution: make the rule always return Encode.pm (plus potentially
other modules).