Hardware::UPS::Perl::Utils - utility functions for packages dealing with an UPS
use Hardware::UPS::Perl::Utils qw( configure error warning );
Hardware::UPS::Perl::Utils provides functions for packages dealing with an UPS.
configure - processes arguments
&configure($actions, \@arguments);
configure processes arguments @arguments using the action table $actions being an anonymous hash of anonymous subroutines.
@arguments
$actions
the action table; supplies a set of anonymous subroutines to process the options.
$arguments
anonymous array of arguments.
error - displays internal error messages and dies
&error($errorMessage);
error displays the error message $errorMessage with respect to the calling method and dies using Carp::croak().
Carp::croak()
$errorMessage
string; the error message.
"warning"
warning - displays internal error messages
&warning($warningMessage);
warning displays the error message $warningMessage with respect to the calling method using Carp::carp().
Carp::carp()
$warningMessage
string; the warning message.
"error"
Carp(3pm), Hardware::UPS::Perl::Connection(3pm), Hardware::UPS::Perl::Connection::Net(3pm), Hardware::UPS::Perl::Connection::Serial(3pm) Hardware::UPS::Perl::Constants(3pm), Hardware::UPS::Perl::Driver(3pm), Hardware::UPS::Perl::Driver::Megatec(3pm), Hardware::UPS::Perl::General(3pm), Hardware::UPS::Perl::Logging(3pm), Hardware::UPS::Perl::PID(3pm),
Hardware::UPS::Perl::Utils was inspired by the usv.pl program by Bernd Holzhauer, <www.cc-c.de>. The latest version of this program can be obtained from
http://www.cc-c.de/german/linux/linux_usv.php
Another great resource was the Network UPS Tools site, which can be found at
http://www.networkupstools.org
Hardware::UPS::Perl::Utils was developed using perl 5.8.8 on a SuSE 10.1 Linux distribution.
There are plenty of them for sure. Maybe the embedded pod documentation has to be revised a little bit.
Suggestions to improve Hardware::UPS::Perl::Utils are welcome, though due to the lack of time it might take a while to incorporate them.
Copyright (c) 2007 by Christian Reile, <Christian.Reile@t-online.de>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. For further licensing details, please see the file COPYING in the distribution.
To install Hardware::UPS::Perl::PID, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Hardware::UPS::Perl::PID
CPAN shell
perl -MCPAN -e shell install Hardware::UPS::Perl::PID
For more information on module installation, please visit the detailed CPAN module installation guide.