PkgForge::Utils - General utilities for the LCFG Package Forge
This documentation refers to PkgForge::Utils version 1.4.8
use PkgForge::Utils; PkgForge::Utils::remove_tree($dir);
This module provides various utility functions which are used throughout the LCFG Package Forge software suite.
This will remove a tree of files and directories in a similar way to the function with the same name in newer versions of the File::Path module. It takes a directory name and an optional reference to a hash of options. It returns the number of files and directories which have been deleted. The supported options are:
A boolean, when this is true the files and directories removed will be printed to STDOUT, defaults to false.
A boolean, when this is true the top-level directory itself will not be removed, only the contents would be erased. This defaults to false.
A reference to an array into which the list of removed files and directories will be added.
A reference to an array into which the list of any failures to remove files and directories will be added.
This function will find all the sub-directories of the specified directory. It puts them into an array (which is referenced in the second required argument) which is ordered such that the sub-directories are before the directory itself. This is used by
This does the equivalent of kinit(1) using the specified keytab and principal. Optionally you can specify the credentials cache to use, by default it uses a memory cache. The KRB5CCNAME environment variable will be set so that Kerberos-aware modules (such as DBI) will automatically use the credentials cache.
This computes and returns the job-specific results directory given the base directory and the UUID for the job.
This is the list of platforms on which we have tested this software. We expect this software to work on any Unix-like platform which is supported by Perl.
Please report any bugs or problems (or praise!) to firstname.lastname@example.org, feedback and patches are also always very welcome.
Stephen Quinney <email@example.com>
Copyright (C) 2010-2011 University of Edinburgh. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the terms of the GPL, version 2 or later.