summaryrefslogtreecommitdiff
path: root/selftest/selftest.pl
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2010-10-18 20:21:12 +0400
committerMatthieu Patou <mat@samba.org>2010-10-18 19:09:07 +0000
commitb1a13e5e1453b6f776e0a35f293f4060c77fe59a (patch)
tree270b49d877f0d06565aea401a975c418b71be3fe /selftest/selftest.pl
parent8556602b048e825b35df314d6865f997823ec2bb (diff)
downloadsamba-b1a13e5e1453b6f776e0a35f293f4060c77fe59a.tar.gz
samba-b1a13e5e1453b6f776e0a35f293f4060c77fe59a.tar.bz2
samba-b1a13e5e1453b6f776e0a35f293f4060c77fe59a.zip
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")
Diffstat (limited to 'selftest/selftest.pl')
-rwxr-xr-xselftest/selftest.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index 08ee52c55e..7431bed8ed 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -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;