File: //usr/share/doc/debian-policy/perl-policy.html/ch-embed.html
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Chapter 6. Programs Embedding Perl</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" />
<link rel="home" href="index.html" title="Debian Perl Policy" />
<link rel="up" href="index.html" title="Debian Perl Policy" />
<link rel="prev" href="ch-programs.html" title="Chapter 5. Perl Programs" />
<link rel="next" href="ap-perl6.html" title="Appendix A. Perl 6" />
</head>
<body>
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center">Chapter 6. Programs Embedding Perl</th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="ch-programs.html">Prev</a> </td>
<th width="60%" align="center"> </th>
<td width="20%" align="right"> <a accesskey="n" href="ap-perl6.html">Next</a></td>
</tr>
</table>
<hr />
</div>
<div class="chapter">
<div class="titlepage">
<div>
<div>
<h1 class="title"><a id="ch-embed"></a>Chapter 6. Programs Embedding Perl</h1>
</div>
</div>
</div>
<div class="toc">
<p>
<strong>Table of Contents</strong>
</p>
<dl class="toc">
<dt>
<span class="section">
<a href="ch-embed.html#s-build-embedded">6.1. Building Embedded Programs</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch-embed.html#s-embedded-deps">6.2. Embedded Perl Dependencies</a>
</span>
</dt>
<dt>
<span class="section">
<a href="ch-embed.html#s-perl-upgrades">6.3. Perl Package Upgrades</a>
</span>
</dt>
</dl>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a id="s-build-embedded"></a>6.1. Building Embedded Programs</h2>
</div>
</div>
</div>
<p>
Programs which embed a perl interpreter must declare a
<code class="literal">Build-Depends</code> on <code class="systemitem">libperl-dev</code>.
</p>
<p>
The default linker options produced by
</p>
<pre class="screen">perl -MExtUtils::Embed -e ldopts</pre>
<p>
will link against the dynamic <code class="literal">libperl</code>. If
programs wish to link to the static library, then
<code class="literal">-lperl</code> should be changed to
<code class="filename">/usr/lib/libperl.a</code> in those options.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a id="s-embedded-deps"></a>6.2. Embedded Perl Dependencies</h2>
</div>
</div>
</div>
<p>
Dependencies for programs linking against the shared Perl library
will be automatically created by
<span class="command"><strong>dpkg-shlibdeps</strong></span>. Note however that the shared
perl library package only suggests <code class="systemitem">perl-base</code> and packages requiring any
<em class="replaceable"><code>core</code></em> modules from the <code class="systemitem">perl</code> package must depend upon it
explicitly.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a id="s-perl-upgrades"></a>6.3. Perl Package Upgrades</h2>
</div>
</div>
</div>
<p>
Starting from <code class="systemitem">perl</code>
5.12.3-2, a dpkg trigger named
<em class="replaceable"><code>perl-major-upgrade</code></em> will be triggered by
the postinst of the <code class="systemitem">perl</code>
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 <code class="literal">@INC</code>, or one
which changes <code class="literal">abiname</code>. Any package may declare
an interest in the trigger, especially packages including
long-running daemons which would stop working until restart.
</p>
<p>
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.
</p>
</div>
</div>
<div class="navfooter">
<hr />
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left"><a accesskey="p" href="ch-programs.html">Prev</a> </td>
<td width="20%" align="center"> </td>
<td width="40%" align="right"> <a accesskey="n" href="ap-perl6.html">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Chapter 5. Perl Programs </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
<td width="40%" align="right" valign="top"> Appendix A. Perl 6</td>
</tr>
</table>
</div>
</body>
</html>