Hardware::UPS::Perl::Constants - general constants for UPS modules and scripts
use Hardware::UPS::Perl::Constants qw( UPSBASENAME UPSEXECUTABLE UPSFQDN UPSHOSTNAME UPSLOGFILE UPSMAILTO UPSPIDFILE UPSPORT UPSTCPPORT ); print STDOUT UPSBASENAME, "\n"; print STDOUT UPSEXECUTABLE, "\n"; print STDOUT UPSFQDN, "\n"; print STDOUT UPSHOSTNAME, "\n"; print STDOUT UPSLOGFILE, "\n"; print STDOUT UPSMAILTO, "\n"; print STDOUT UPSPIDFILE, "\n"; print STDOUT UPSPORT, "\n"; print STDOUT UPSSCRIPT, "\n"; print STDOUT UPSTCPPORT, "\n";
Hardware::UPS::Perl::Constants provides general constants required for dealing with an UPS.
The basename of the calling script. This constant is determined at runtime using package File::Basename.
The full path name of the calling script. This constant is determined at runtime from $UPSBASENAME using the packages File::Spec::Functions and FindBin. This might be useful for restarting a program.
The fully qualified domain name of the local host. The constant is determined at runtime using the Perl5 extension package Net::Domain.
The hostname of the local host. The constant is determined at runtime using the Perl5 extension package Net::Domain.
The default log file /var/log/UPSSCRIPT.log.
The default mail address to send mails to in case of alerts. This variable is identical to the environment variable UPS_MAILTO.
The default PID file /var/run/UPSSCRIPT.pid.
The default serial port for a local UPS. This constant is set to /dev/ttyS0 unless overriden by the environment variable UPS_PORT.
The name of the calling script. This constant is determined at runtime from UPSBASENAME.
The default TCP/IP port where a remote Hardware::UPS::Perl agent can be found. This constant is set to 9050 unless overriden by the environment variable UPS_TCPPORT.
Env(3pm), File::Basename(3pm), File::Spec::Functions(3pm), FindBin(3pm), Net::Domain(3pm), constant(3pm), Hardware::UPS::Perl::Connection(3pm), Hardware::UPS::Perl::Connection::Net(3pm), Hardware::UPS::Perl::Connection::Serial(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(3pm)
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::Constants 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.