---
name: "DhMakePerl::Command::Packaging"
section: "3pm"
platform: "linux"
package: "dh-make-perl"
version: "0.128"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/DhMakePerl::Command::Packaging"
---

# DhMakePerl::Command::Packaging(3pm)

common routines for 'make' and 'refresh' dh-make-perl commands

## NAME

DhMakePerl::Command::Packaging - common routines for 'make' and 'refresh' dh-make-perl commands

## METHODS

- main\_file(file\_name)

  Constructs a file name relative to the main source directory, "main\_dir"

- debian\_file(file\_name)

  Constructs a file name relative to the debian/ sub-directory of the main source directory.

- explained\_dependency *$reason*, *$dependencies*, *@dependencies*

  Adds the list of dependencies to *$dependencies* and shows *$reason* if in verbose mode.

  Used to both bump a dependency and tell the user why.

  *$dependencies* is an instance of Debian::Dependencies class, and *@dependencies* is a list of Debian::Dependency instances or strings.

  The message printed looks like `"$reason needs @dependencies"`.

- configure\_cpan

  Configure CPAN module. It is safe to call this method more than once, it will do nothing if CPAN is already configured.

- discover\_dependencies

  Just a wrapper around `$self`-\>control-\>discover\_dependencies which provides the right parameters to it.

  Returns a list of missing modules.

- discover\_utility\_deps

  Determines whether certain versions of [**debhelper**(1)](/debhelper/1.md) and other packages are needed by the build process.

  The following special cases are detected:

  - Module::Build::Tiny

    if Module::Build::Tiny is present in the build-dependencies, debhelper dependency is raised to 9.20140227~ in case it was lower before.

  - dh --with=quilt

    `"dh --with=quilt"` needs quilt.

  - quilt.make

    If */usr/share/quilt/quilt.make* is included in *debian/rules*, a build-dependency on `"quilt"` is added.

  - dh --with=perl\_dbi

    A build dependency on `"libdbi-perl"` is added.

  - dh --with=perl\_openssl

    A build dependency on `"perl-openssl-defaults"` is added.

- makefile\_pl\_is\_MBC

  Checks if *Makefile.PL* is a compatibility wrapper around Build.PL provided by Module::Build::Compat.

- backup\_file(file\_name)

  Creates a backup copy of the specified file by adding `".bak"` to its name. If the backup already exists, it is overwritten.

  Does nothing unless the `"backups"` option is set.

- unquote(*string*)

  Runs its argument through Text::Balanced's `"extract_quotelike"` method and returns the extracted content with quotes removed. Dies if `"extract_quotelike"` can't find quoted string.

- create\_upstream\_metadata

  Populates *debian/upstream/metadata* with information from *META*, using Debian::Upstream::Metadata::Perl.

- cme\_fix\_dpkg\_control

  The equivalent of letting **cme**(1) reformat and fix *debian/control*.

## COPYRIGHT & LICENSE

- Copyright (C) 2000, 2001 Paolo Molaro \<lupus@debian.org\>

  - Copyright (C) 2002, 2003, 2008 Ivan Kohler \<ivan-debian@420.am\>

  - Copyright (C) 2003, 2004 Marc 'HE' Brockschmidt \<he@debian.org\>

  - Copyright (C) 2005-2007 Gunnar Wolf \<gwolf@debian.org\>

  - Copyright (C) 2006 Frank Lichtenheld \<djpig@debian.org\>

  - Copyright (C) 2007-2025, gregor herrmann \<gregoa@debian.org\>

  - Copyright (C) 2007-2013 Damyan Ivanov \<dmn@debian.org\>

  - Copyright (C) 2008, Roberto C. Sanchez \<roberto@connexer.com\>

  - Copyright (C) 2009-2011, Salvatore Bonaccorso \<carnil@debian.org\>

  - Copyright (C) 2011, Nicholas Bamber \<nicholas@periapt.co.uk\>

  - Copyright (c) 2016, Nick Morrott \<knowledgejunkie@gmail.com\>

  - Copyright (c) 2017, David Miguel Susano Pinto \<carandraug+dev@gmail.com\>

  This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
