MEAD
MEAD
Globals (from use vars definitions) |
$VERBOSE |
$DEBUG |
$MEADDIR |
$VERSION |
strict |
vars(1) ' $VERSION ' |
vars(2) ' $MEADDIR ' |
vars(3) ' $DEBUG ' |
vars(4) ' $VERBOSE ' |
Methods description
Methods code
Debug | description | top | prev | next |
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.