The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Hardware::UPS::Perl::Constants - general constants for UPS modules and scripts

SYNOPSIS

    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";

DESCRIPTION

Hardware::UPS::Perl::Constants provides general constants required for dealing with an UPS.

CONSTANTS

@EXPORT

@EXPORT_OK

UPSBASENAME

The basename of the calling script. This constant is determined at runtime using package File::Basename.

UPSEXECUTABLE

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.

UPSFQDN

The fully qualified domain name of the local host. The constant is determined at runtime using the Perl5 extension package Net::Domain.

UPSHOSTNAME

The hostname of the local host. The constant is determined at runtime using the Perl5 extension package Net::Domain.

UPSLOGFILE

The default log file /var/log/UPSSCRIPT.log.

UPSMAILTO

The default mail address to send mails to in case of alerts. This variable is identical to the environment variable UPS_MAILTO.

UPSPIDFILE

The default PID file /var/run/UPSSCRIPT.pid.

UPSPORT

The default serial port for a local UPS. This constant is set to /dev/ttyS0 unless overriden by the environment variable UPS_PORT.

UPSSCRIPT

The name of the calling script. This constant is determined at runtime from UPSBASENAME.

UPSTCPPORT

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.

SEE ALSO

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)

BUGS

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.

AUTHOR

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.