- or download this
sub dbg {
my ($self,$msg) = @_;
return if (! $self->{_debug});
print STDERR "[DEBUG] : $msg\n";
}
- or download this
sub debug {
my ($self,$val) = @_;
$self->{_debug} = $val if (defined $val);
$self->{_debug};
}
- or download this
sub dbg {
my $msg = shift;
print "[DEBUG] : $msg\n" if ($main::DEBUG);
}