OpenNMS::Util(3pm)

NAME
OpenNMS::Util - a collection of utility functions.

SYNOPSIS
  use OpenNMS::Util;

METHODS

•   find_executable($exe)

    Locate an executable. It will first look for an all-caps environment variable pointing to the binary (RPM = rpm, APT_FTPARCHIVE = apt-ftparchive, etc.), and check that it is executable, and barring that, look for it in the path.

•   read_properties($file)

    Reads a property file and returns a hash of the contents.

•   slurp($file)

    Reads the contents of a file and returns it as a string.

•   spit($file, $contents)

    Writes the contents to the specified file.

•   gpg_write_key($id, $password, $file)

    Given a GPG ID and password, and an output file, writes the ASCII-armored version of the GPG key to the given file.

•   gpg_detach_sign_file($id, $password, $inputfile, [$outputfile])

    Given a GPG ID and password, and a file, detach-signs the specified file and outputs to $outputfile. If no output file is specified, it creates a file named "$inputfile.asc".

AUTHOR
Benjamin Reed <ranger@opennms.org> Matt Brozowski <brozow@opennms.org>

COPYRIGHT AND LICENSE
Copyright (C) 2012 by The OpenNMS Group, Inc.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.