| Next | Trivial Utilities | 103 |
In several places we saw temp_error():
symlink $head, $CONF{curfile} or
temp_error("Couldn't symlink $head to $CONF{curfile}: $!", 30);
unless (opendir SPOOLD, $dir) {
temp_error("Couldn't read spool directory $dir: $!", 10);
}
In such cases, printd goes to sleep for a while and tries again
sub temp_error {
my ($message, $delay) = @_;
###XXX TODO log the $message
warn "printd: $message\n";
$NEXTOP = time() + $delay;
next MAINLOOP;
}
I hadn't decided yet what to do about logging
A notable feature here is Perl's awful non-local next
next MAINLOOP here restarts the main loop back in the caller
| Next | Menu | ![]() |
Copyright © 2012 M. J. Dominus |