Chapter 6. Programs Embedding Perl

Table of Contents

6.1. Building Embedded Programs
6.2. Embedded Perl Dependencies
6.3. Perl Package Upgrades

6.1. Building Embedded Programs

Programs which embed a perl interpreter must declare a Build-Depends on libperl-dev.

The default linker options produced by

perl -MExtUtils::Embed -e ldopts

will link against the dynamic libperl. If programs wish to link to the static library, then -lperl should be changed to /usr/lib/libperl.a in those options.

6.2. Embedded Perl Dependencies

Dependencies for programs linking against the shared Perl library will be automatically created by dpkg-shlibdeps. Note however that the shared perl library package only suggests perl-base and packages requiring any core modules from the perl package must depend upon it explicitly.

6.3. Perl Package Upgrades

Starting from perl 5.12.3-2, a dpkg trigger named perl-major-upgrade will be triggered by the postinst of the perl package during major upgrades. Some examples of things which constitute a major upgrade are an upgrade which would change the value of versioned directories in @INC, or one which changes abiname. Any package may declare an interest in the trigger, especially packages including long-running daemons which would stop working until restart.

It is suggested that such packages include an appropriate section in their postinst to handle the trigger by restarting relevant daemons or notifying users of further action.