logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Debian::PkgPerl::Util - utility functions for PkgPerl tools

Description

Debian::PkgPerl::Util contains some utility functions for PkgPerl tools.

Methods

probable_build_dependency(packagename)
           Returns  true  if the package name is likely to be used for building, and not only at runtime or only
           for testing.

       download_and_cache_file(URL, localfilename, expirationtimeinseconds)
           Helper function to download a file from URL and save it in  $ENV{XDG_CACHE_HOME}/pkg-perl-tools/  (or
           $ENV{HOME}/.cache/pkg-perl-tools/)  as  filename,  unless the file already exists and is younger than
           expirationtime in seconds.

           Returns the full filename as a string.

Name

       Debian::PkgPerl::Util - utility functions for PkgPerl tools

Synopsis

        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 Also