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 (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