From 97c34f3e6f2a954a267624c9059de35d74e7c3dc Mon Sep 17 00:00:00 2001 From: Aurélien Aptel Date: Mon, 15 Jul 2013 19:01:58 +0200 Subject: test_smbclient_tarmode.pl: make script work on older Perl (now only need 5.14) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Aptel Reviewed-by: David Disseldorp Reviewed-by: Jim McDonough --- source3/script/tests/test_smbclient_tarmode.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source3/script/tests') diff --git a/source3/script/tests/test_smbclient_tarmode.pl b/source3/script/tests/test_smbclient_tarmode.pl index 6d09e1e4689..a2152cc6762 100755 --- a/source3/script/tests/test_smbclient_tarmode.pl +++ b/source3/script/tests/test_smbclient_tarmode.pl @@ -26,7 +26,7 @@ C - Test for smbclient tar backup feature # x F DONE # x F r DONE -use v5.16; +use v5.14; use strict; use warnings; @@ -36,7 +36,7 @@ use File::Path qw/make_path remove_tree/; use Getopt::Long; use Pod::Usage; use Term::ANSIColor; - +use Digest::MD5 qw/md5_hex/; sub d {print Dumper @_;} # DEFAULTS @@ -806,7 +806,12 @@ sub check_tar { $done{$p}++; # different file + my $md5 = $f->data; + if($^V lt v5.16) { + $md5 = md5_hex($md5); + } + if($md5 ne $h{$p}->md5) { say " ! $p ($md5)"; push @diff, $p; -- cgit