MEAD

MEAD

Included libraries Package variables General documentation Methods

Package variables top
Globals (from use vars definitions)
$VERBOSE
$DEBUG
$MEADDIR
$VERSION
Included modulestop
strict
vars(1) ' $VERSION '
vars(2) ' $MEADDIR '
vars(3) ' $DEBUG '
vars(4) ' $VERBOSE '
Inherit top
Exporter
Synopsistop
No synopsis!
Descriptiontop
No description!
Methodstop
DebugNo descriptionCode

Methods description


Methods code

Debugdescriptiontopprevnext
sub Debug {
    my $message = shift;
    my $crit = shift || 1;
    my $caller = shift;

    return unless $VERBOSE + $crit > 2;

    my $crit_str;
 
    if (!($caller)) { $caller = "(unknown)" }
    if (!($message)) { $message = "(none given)" }
    if (!($crit) || ($crit !~ /^[0-9]$/)) { $crit = 1 }
        
    if ($crit < 2) { $crit_str = "DEBUG" }
    elsif ($crit == 2) { $crit_str = "ERROR" }
    else { $crit_str = "FATAL" }

    if ($VERBOSE + $crit > 2) {
        print STDERR $crit_str.": ". $message;
        if ($VERBOSE > 1) {
            print STDERR " (in function: $caller)";
        }
        print STDERR "\n";
    }
}

General documentation

No general documentation available.