Debian...kgLists(3pm)
π Debian::DpkgLists β the perl module, bestie π
okay so this is a page from the User Contributed Perl Documentation, and it's all about Debian::DpkgLists, a lil perl module that goes rummaging through dpkg's package database for you π
β¨ NAME β¨
Debian::DpkgLists β scan the dpkg database for files and patterns, no cap π¦
πΈ 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');
likeβ¦ four lines and ur done, it's giving effortless π
π«Ά DESCRIPTION π«Ά
Debian::DpkgLists is a module for easy searching of dpkg(1)'s package database, which (plot twist) is literally just a simple list of full file names β leading slash included, periodt.
There are a couple of different class methods for searching, so you can vibe with whichever one fits ur situation:
- by full path
- by partial path
- by a regular expression
- by a Perl module name
β οΈ important lore, bestie: dpkg's database only represents dpkg's idea of what is installed on the system. If you also wanna search in packages that are available from the Debian archive but not installed locally, go look at Debian::AptContents instead. iykyk π
π CLASS-METHODS π
β scan_full_path ( path )
Scans the dpkg database for files whose full path is equal to path. Use this one when you already have the full path of the file you want, like "/usr/bin/perl". iconic behavior honestly.
Returns a (possibly empty) list of packages containing path.
π¦ scan_partial_path ( path )
Scans the dpkg database for files whose full path ends with path. Use this when you only care about the file name or some other trailing portion of the full path β like "bin/perl", which matches both "/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 the dpkg database for files whose full path matches pattern. regex girlies rise up π₯
Returns a (possibly empty) list of packages containing files whose full path matches pattern.
π scan_perl_mod ( Module::Name )
Scans the dpkg database for files corresponding to the given Module::Name. This is a shorthand method for "scan_pattern" with a pattern that matches "/Module/Name.pm$" in all directories in @INC. the way that it just does all that for uβ¦ obsessed π
Returns a (possibly empty) list of packages containing possible Module::Name files.
π AUTHOR π
Damyan Ivanov <dmn@debian.org> β shoutout to the dev, real main character energy π
π COPYRIGHT & LICENSE π
Copyright (C) 2010 Damyan Ivanov <dmn@debian.org>
Copyright (C) 2019-2020 gregor herrmann <gregoa@debian.org>
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.
π fr fr do not skip the license part, the lawyers are watching
aaaand that's the whole page, bestie πΈ this one shipped as part of perl v5.40.1, dated 2026-05-08, and the manual name in the header/footer is Debian...kgLists(3pm) β so if u ever see that truncated lil guy floating around, that's just this page π slay, bye β¨
π¦ where this page comes from
- ubuntu stonking: libdebian-source-perl 0.133 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms