logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Debian::DpkgLists - scan dpkg database for files/patterns

Author

       Damyan Ivanov <dmn@debian.org>

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.

Description

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.

Name

       Debian::DpkgLists - scan dpkg database for files/patterns

Synopsis

           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');

See Also