AptPkg::Policy(3pm)
π AptPkg::Policy β APT package version policy class π
okay besties, gather round π«Ά this one is AptPkg::Policy, a Perl module from the User Contributed Perl Documentation collection, and it is literally the class that handles APT's package version policy. it's giving backstage-pass-to-the-pin-priorities energy and i'm obsessed π
β¨ SYNOPSIS β¨
like, the entire vibe-check to get in:
use AptPkg::Policy;
that's it. that's the whole thing. iconic. π
πΈ DESCRIPTION πΈ
so AptPkg::Policy is the module that gives you an interface to APT's package version policy. no cap.
π¦ AptPkg::Policy
the AptPkg::Policy package implements the APT pkgPolicy class. periodt.
now listen, you don't just make one of these yourself β an instance of the AptPkg::Policy class can be fetched using the "policy" method from an AptPkg::Cache object. that's the way that you get in. iykyk π
the following methods are implemented, and yes we're listing all of them, don't skip:
priority(VER|FILE)β returns the pin priority for the givenVER(anAptPkg::Cache::Versionobject) orFILE(anAptPkg::Cache::PkgFileobject). so basically: hand it a version or a package file, get the priority back. simple as. βcandidate(PKG)β returns the installation candidate version forPKG. and what comes back? anAptPkg::Cache::Versionobject, fr fr. that's your β¨candidateβ¨ bestie π«Ά
π SEE ALSO π
go give these their flowers too:
π AUTHOR π
this masterpiece was written by Brendan O'Dea <bod@debian.org> π absolute legend behaviour.
and that's a wrap, babes π this page ships with perl v5.42.3 and it was dated 2026-08-19 β so when you're reading this just remember the tech is timeless and so are you. mwah! πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: libapt-pkg-perl 0.1.43build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms