summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-06-03 10:48:17 +0000
committerOlivier Blin <oblin@mandriva.org>2005-06-03 10:48:17 +0000
commit878459de08a5be8b73377b4f5d53c946447fdf67 (patch)
tree7c02e6efb35dca8a851aa62cb55879fb5fea3b09
parent518affd38b5ea83c5ae5bd1c4bd1b06001ddc5df (diff)
downloadmgaonline-878459de08a5be8b73377b4f5d53c946447fdf67.tar
mgaonline-878459de08a5be8b73377b4f5d53c946447fdf67.tar.gz
mgaonline-878459de08a5be8b73377b4f5d53c946447fdf67.tar.bz2
mgaonline-878459de08a5be8b73377b4f5d53c946447fdf67.tar.xz
mgaonline-878459de08a5be8b73377b4f5d53c946447fdf67.zip
use perl_checker compliant md5file() from net_applet (this ought to be moved in some common module, it is used in userdrake as well)
-rwxr-xr-xmdkapplet10
1 files changed, 5 insertions, 5 deletions
diff --git a/mdkapplet b/mdkapplet
index bbe94c96..566730bd 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -26,7 +26,6 @@ use interactive;
use common;
use Gtk2::Pango;
-use Digest::MD5;
BEGIN { unshift @::textdomains, 'mdkonline' }
@@ -183,11 +182,12 @@ sub showMainWindow() {
}
sub md5file {
my @md5;
+ require Digest::MD5;
foreach my $file (@_) {
- open(FILE, $file) or do { print STDERR "Can't open '$file': $!"; push @md5, "" };
- binmode(FILE);
- push @md5, Digest::MD5->new->addfile(*FILE)->hexdigest;
- close(FILE);
+ open(my $FILE, $file) or do { print STDERR "Can not open '$file': $!"; push @md5, "" };
+ binmode($FILE);
+ push @md5, Digest::MD5->new->addfile($FILE)->hexdigest;
+ close($FILE);
}
return wantarray() ? @md5 : $md5[0];
}