mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
selftest: correct the import of Time::HighRes
The "use" is always evaluated first even if enclosed into a if. So on plateform without Time::Hires (ie. sun8 in the build farm). This leads to an error. Instead we use the synthax require Module + Module->import("function")
This commit is contained in:
parent
8556602b04
commit
b1a13e5e14
@ -135,9 +135,10 @@ use SocketWrapper;
|
||||
|
||||
eval {
|
||||
require Time::HiRes;
|
||||
Time::HiRes->import("time");
|
||||
};
|
||||
unless ($@) {
|
||||
use Time::HiRes qw(time);
|
||||
if ($@) {
|
||||
print "You don't have Time::Hires installed !\n";
|
||||
}
|
||||
|
||||
my $opt_help = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user