Andreas Vögele


CPANPLUS::Dist::Slackware::PackageDescription - Collect information on a package


This document describes CPANPLUS::Dist::Slackware::PackageDescription version 1.022.


    use CPANPLUS::Dist::Slackware::PackageDescription;

    $pkgdesc = CPANPLUS::Dist::Slackware::PackageDescription->new(
        module => $modobj,
        tag    => '_MYTAG',
        type   => 'txz'

    $filename = $pkgdesc->filename();
    $summary  = $pkgdesc->summary();
    $desc     = $pkgdesc->slack_desc();
    @docfiles = $pkgdesc->docfiles();


This module gets information on a yet-to-be-created Slackware compatible package. The information is obtained from a CPANPLUS::Module object, the file system and the environment. Among other things, the module translates a Perl distribution's name and version into a package name. It tries to find a short summary that describes the distribution. It can build a slack_desc description for you. It finds standard documentation files like README and Changes.



Returns a newly constructed object.

    $pkgdesc = CPANPLUS::Dist::Slackware::PackageDescription->new(
        module => $modobj,

The CPANPLUS::Module object is mandatory. All other attributes are optional.


Returns the CPANPLUS::Module object that was passed to the constructor.


Returns the package name, e.g. "perl-Some-Module".


Returns the package version, e.g. "0.01".


Returns the package name and version, e.g. "perl-Some-Module-0.01".


Returns the package's build number. Defaults to $ENV{BUILD} or "1".


Sets the package's build number.


Returns the package architecture. If unset, either the value of $ENV{ARCH} or a platform-specific identifier like "i486" is returned.


Returns a tag that is added to the package filename. Defaults to $ENV{TAG} or "_CPANPLUS".


Returns the package extension. Defaults to $ENV{PKGTYPE} or "tgz". Other possible values are "tbz", "tlz" and "txz".


Returns the package's filename, e.g. perl-Some-Module-0.01-i486-1_CPANPLUS.tgz.


Returns the directory where all created packages are stored. Defaults to $OUTPUT, $TMPDIR or /tmp.


Returns the package's full filename, e.g. /tmp/perl-Some-Module-0.01-i486-1_CPANPLUS.tgz.


Returns the packages's documentation directory, e.g. /usr/doc/perl-Some-Module-0.01.


Returns a list of standard documentation files that the distribution contains, e.g. ("Changes", "LICENSE, "README"). The filenames are relative to the distribution's top-level directory.

Must be called after the distribution has been extracted.


Returns a description of the distribution's purpose, e.g. "Drop atomic bombs on Australia".

Must not be called before the distribution has been extracted. Gives better results when called after the distribution has been built, i.e. when the "blib" directory is available.


Returns a config shell function that can be added to the script in the package's install directory.

Only the shell function is returned. You have to add the config function calls for each configuration file yourself.


Returns a Slackware package description that can be written to the slack-desc file in the package's install directory.


Returns a build script that can be written to perl-Some-Module.SlackBuild in the package's documentation directory.


Returns the text of a README.SLACKWARE file that can be stored in the package's documentation directory. The returned document lists the build dependencies. You can add more text to this document, e.g. a list of configuration files provided by the package.


Returns the staging directory where the distribution is temporarily installed, e.g. /tmp/CPANPLUS/package-perl-Some-Module-01yEr7X43K. Defaults to a package-specific subdirectory in $TMP or /tmp/CPANPLUS.




See above and CPANPLUS::Dist::Slackware for supported environment variables.


Requires the modules File::Spec, File::Temp, Pod::Find, Pod::Simple, POSIX, Text::Wrap, and version 0.77. If available, the module Parse::CPAN::Meta is used.


None known.




Andreas Voegele <>


Please report any bugs to bug-cpanplus-dist-slackware at, or through the web interface at


Copyright 2012-2015 Andreas Voegele

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See for more information.