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