Debian::...erl::Util(3pm)
β¨ NAME β¨
Debian::PkgPerl::Util β bestie, it's the utility functions for the PkgPerl tools π (yes, the whole toolkit's little helper drawer, we love her)
It's a Perl module from the pkg-perl-tools situation, so keep that in mind ok?
πΈ SYNOPSIS πΈ
okay so first you gotta pull her in:
use Debian::PkgPerl::Util;
...
$dep = "$dep <!nocheck>"
unless Debian::PkgPerl::Util->probable_build_dependency($pkg);
$cachefile = Debian::PkgPerl::Util->download_and_cache_file(
"https://example.com/foo.txt",
"bla.txt",
86400
);
see how she's just there, doing the most, being class-attribute-callable like the main character she is π
π¦ DESCRIPTION π¦
Debian::PkgPerl::Util contains some utility functions for PkgPerl tools π
that's literally it, that's the whole pitch, she's a grab-bag of handy stuff and honestly? iconic.
π METHODS π
probable_build_dependency(package name)β hands you back true if that package name is likely to get used for building, and not just at runtime and not just for testing π οΈ like, if it's a build-only girly, she says yes bestie. Runtime-only? Testing-only? nope, not it.download_and_cache_file(URL, local filename, expiration time in seconds)β the helper function that goes and grabs a file from URL and stashes it in$ENV{XDG_CACHE_HOME}/pkg-perl-tools/β or, if that env var isn't around,$ENV{HOME}/.cache/pkg-perl-tools/β saving it as local filename. π
BUT β and this is the key part β she will not re-download if the file already exists and is younger than expiration time in seconds. no cap, she checks the age first. if it's fresh, she's leaving it alone. if it's old, she's fetching again. periodt. π
Returns the full filename as a string π«Ά (a plain old string, that's it, that's the return value, go use it)
π COPYRIGHT AND LICENSE π
Copyright 2022-2023 gregor herrmann gregoa@debian.org Copyright 2022 Damyan Ivanov dmn@debian.org
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See <http://dev.perl.org/licenses/> for more information.
so basically pick your fav of the two licenses, both are on the menu, no pressure bestie π
and that's the whole page <3 sending you off with the receipts: this was pkg-perl-tools 0.88, dated 2026-04-01, and the manual was Debian::PkgPerl::Util(3pm) π go forth and call those methods, you got this fr fr πβ¨
π¦ where this page comes from
- ubuntu stonking: pkg-perl-tools 0.88 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms