Debian::DpkgLists(3pm)

Debian::DpkgLists3pm

Scan dpkg database for files/patterns

Usage

    my @packages = Debian::DpkgLists->scan_full_path('/full/file/path');
    my @packages = Debian::DpkgLists->scan_partial_path('file/path');
    my @packages = Debian::DpkgLists->scan_pattern(qr{freedom$});
    my @packages = Debian::DpkgLists->scan_perl_mod('Some::Module');

Overview

Debian::DpkgLists is a module for easy searching of dpkg(1)'s package database which contains a simple list of full file names (including the leading slash).

There are a couple of different class methods for searching by full or partial path, a regular expression or a Perl module name.

Note that dpkg's database represent only dpkg's idea of what is installed on the system. If you want to also search in packages, available from the Debian archive but not installed locally, see Debian::AptContents.

Class-methods

scan_full_path ( path )

Scans dpkg database for files, whose full path is equal to path. Use when you have the full path of the file you want, like "/usr/bin/perl".

Returns a (possibly empty) list of packages containing path.

scan_partial_path ( path )

Scans dpkg database for files, whose full path ends with path. Use when you only care about the file name or other trailing portion of the full path like "bin/perl" (matches "/usr/bin/perl" and "/sbin/perl").

Returns a (possibly empty) list of packages containing files whose full path ends with path.

scan_pattern ( pattern )

Scans dpkg database for files, whose full path matches pattern.

Returns a (possibly empty) list of packages containing files whose full path matches pattern.

scan_perl_mod ( Module::Name )

Scans dpkg database for files, corresponding to given Module::Name. This is a shorthand method for "scan_pattern" with a pattern that matches "/Module/Name.pm$" in all directories in @INC.

Returns a (possibly empty) list of packages containing possible Module::Name files.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 7 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13

Author

Damyan Ivanov <[email protected]>

From libdebian-source-perl 0.128 in Debian 13 (Trixie). Parsed by carta from the page's man source.