Where:
-usa|ge Print this usage
-h|elp Detailed help
- -v|erbose Verbose mode (Default: -verbose)
+ -v|erbose Verbose mode (Default: Not verbose)
-de|bug Turn on debugging (Default: Off)
-user|name User name to log in with (Default: $USER)
return;
} # interrupted
-sub Connect2IMAP;
-
-sub restart {
- my $msg = "Re-establishing connection to $opts{imap} as $opts{username}";
-
- $log->dbug($msg);
-
- Connect2IMAP;
+sub restart;
- goto MONITORMAIL;
-} # restart
+sub Connect2IMAP;
$SIG{USR1} = \&interrupted;
$SIG{USR2} = \&restart;
return;
} # MonitorMail
+sub restart {
+ my $msg = "Re-establishing connection to $opts{imap} as $opts{username}";
+
+ $log->dbug($msg);
+
+ Connect2IMAP;
+
+ MonitorMail;
+} # restart
+
END {
# If $log is not yet defined then the exit is not unexpected
if ($log) {