Code Index:


ServDoc_common - list some very common informations about your system


$Id: ServDoc_0000common,v 1.7 2003/11/07 14:01:53 uherbst Exp $


ServDoc_common [-h|help] [-v|version] [--debug COMMON,intensity]


ServDoc_common lists some very common informations about your system:

The system name as returned by (the standard perl) module Sys::Hostname and the date and time when this module is running.


This help.


--debug COMMON,intensity
Turn on Debugging for that module.

The debug feature for that module is named ``COMMON''.


Ulrich Herbst <>

#!/usr/bin/perl -w


# standard perl modules
use strict;                       # print error about unknown variables ...
use English;                      # long internal variable names;
use FindBin;                      # In which directory is ServDoc itself ?
                                  # There has to be the module and the lib dir!
use lib $FindBin::Bin. "/lib";    # Here are the ServDoc-perl-modules
use Sys::Hostname;                # My own hostname
use vars qw($options);

# our own perl modules
use ServDoc;


$options->{Version} =
  '$Id: ServDoc_0000common,v 1.7 2003/11/07 14:01:53 uherbst Exp $';

# We need the cmdline to call the modules with the same debug options.
$options->{cmdline} = join " ", @ARGV;

sub debug { ServDoc_debug( "COMMON", $options, shift, shift ); }

$options = &process_cmdline($options);

   running         => 'ServDoc_common is running',
   hostname        => 'Hostname',
   hostname_short  => 'The name of this computer',
   hostname_long   =>
   'This is the value returned from Sys::Hostname(3). ' .
   'Normally you set and display this with the hostname command.',
   datetime        => 'Date and Time',
   datetime_short  => 'This documentation was written at:',
   datetime_long   => '',
   running         => 'Jetzt l&auml;uft ServDoc_common',
   hostname        => 'Computername',
   hostname_short  => 'Der Name dieses Rechners.',
   hostname_long   =>
   'Dies ist der R&uuml;ckgabewert von Sys::Hostname(3). ' .
   "Normalerweise wird der Hostname gesetzt/angezeigt mit dem Befehl 'hostname'.",
   datetime        => 'Datum und Uhrzeit',
   datetime_short  => 'Diese Dokumentation wurde erstellt am:',
   datetime_long   => '',

debug( 9, i18n_std('running',$0));


# Main

# 1.: The Hostname (as FQDN if possible)

# 2. Date and Time
report_i18n('string','datetime',scalar localtime);