Package: perl
Version: 5.24.1~rc3-3
Severity: wishlist


I was looking at #758847, which asks to run 'enc2xs -C' after
installation of Encode::* packages so that Encode is informed about all
encodings that are currently installed. (This has previously been
mentioned in bugs such as #304433, even though that was really a
different problem.)

This seems to be a sensible request IMHO, but would need to be done for
all libencode-*-perl packages as well as perl itself, and thus should be
thought through a little bit before implementation.

'enc2xs -C' is implemented in make_configlocal_pm(); it searches @INC
for installed Encode::* modules and then writes out the result as
/usr/lib/x86_64-linux-gnu/perl/5.24/Encode/ using
/usr/share/perl/5.24/Encode/ConfigLocal_PM.e2x as template, basically
creating a long list of 'require Encode::...' statements.

Processing is rather fast, so this wouldn't necessarily need a dpkg trigger
but could be run from postinst / postrm. On the other hand I wonder how
Encode reacts if one of the modules is removed and Encode is called
_before_ 'enc2xs -C' has been run again?

Niko mentioned on IRC that the should probably go in /var
and be symlinked into @INC.

Encode itself doesn't seem to run 'enc2xs -C' during installation, nor
does it mention it in its README. Is only meant for
home-made encodings?


Reply via email to