in reply to Re: Strange problem with use
in thread Strange problem with use
If it helps, I get the exact same error. Once I use Schedule::Cron, $Info comes back as undefined. Must be something that conflicts between those two modules.
The eval doesn't help, btw. I assume you put it in to help debug, but the problem is prior to these lines.
I'll keep trying things out, and let you know if I have any luck.
Update: It seems that use'ing Schedule::Cron sets $SIG{CHLD}. This seems to be interfering with the Ifconfig module. I'd say it's a bug in the ifconfig module, the Schedule::Cron module, or both -- but here's a workaround.
Save the old value of $SIG{CHLD}, then call Ifconfig, then restore $SIG{CHLD}. Or, get rid of the use line, and 'require' it below this call.
ormy $oldsigchld = $SIG{CHLD}; $SIG{CHLD} = 'DEFAULT'; # get info for all interfaces + my $Info = Net::Ifconfig::Wrapper::Ifconfig('list', '', '', ''); $SIG{CHLD} = $oldsigchld if(defined $oldsigchld);
If I do either of those things, it works fine. ;-)# get info for all interfaces + my $Info = Net::Ifconfig::Wrapper::Ifconfig('list', '', '', ''); require Schedule::Cron;
~J
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Strange problem with use
by beavis69 (Initiate) on Oct 17, 2003 at 19:17 UTC | |
by beavis69 (Initiate) on Oct 18, 2003 at 10:08 UTC |