unholyangl
Programmer
I'm trapping errors from a wrapper script like the following:
eval { load(); };
Then errors are read with the $@ variable
Now lets say we encounter a problem like the following...
$hsoc = new IO::Socket::INET (
LocalHost => $LocalHost,
LocalPort => $HostPort,
Proto => 'tcp',
Listen => 5,
# Reuse => 1,
) or log::do(0, "WARNING: Socket open failed on port \"$HostPort\"") && return;
Basicly, I wanna raise errors in places like the above, where abviously my log module is being called so that the parent wrapper script can intercept this the same way and then deal with it (ex: log it, compare against last time error happened, how many times it's happened, and how to execute because of this)
I'm sure it's very simple I'm just stumped and none of the books I've downloaded seem to tell me exactly how to do this, either that or I've missed it. Of course this isn't a necessity to what I'm designing, but I'd really like to know.
Thx in advance!! - UnholyAngl
eval { load(); };
Then errors are read with the $@ variable
Now lets say we encounter a problem like the following...
$hsoc = new IO::Socket::INET (
LocalHost => $LocalHost,
LocalPort => $HostPort,
Proto => 'tcp',
Listen => 5,
# Reuse => 1,
) or log::do(0, "WARNING: Socket open failed on port \"$HostPort\"") && return;
Basicly, I wanna raise errors in places like the above, where abviously my log module is being called so that the parent wrapper script can intercept this the same way and then deal with it (ex: log it, compare against last time error happened, how many times it's happened, and how to execute because of this)
I'm sure it's very simple I'm just stumped and none of the books I've downloaded seem to tell me exactly how to do this, either that or I've missed it. Of course this isn't a necessity to what I'm designing, but I'd really like to know.
Thx in advance!! - UnholyAngl