NAME
Csistck::Test::Pkg - Csistck package check
METHODS
pkg($package, [$type])
Test for existing package using forks to system package managers. Package can be specified as a string, or as a hashref:
pkg({
dpkg => 'test-server',
emerge => 'net-test',
default => 'test-server'
});
The package manager will be automatically detected if none is explicitly specified, and the hashref key matching the package manager decides the package name to check. If a default key is provided, that package is used by default.
In repair mode, install the package quietly, unless package manager doesn't handle automating install.
Supported package managers:
detect_pkg_manager()
Detect package manager based on system OS and Linux distribution if applicable. Return package manager as string. This is not exported, it is used for the package test.
pkg_name($package, $type)
Based on input package, return package name. With OS and distribution detection, $package can be passed as a string or a hashref.
See pkg() for information on passing hashrefs as package name
pkg_type()
Return fixed package type
OPTIONS
AUTHOR
Anthony Johnson, <aj@ohess.org>
COPYRIGHT AND LICENSE
Copyright (c) 2012 Anthony Johnson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,