]> git.donarmstrong.com Git - debbugs.git/blobdiff - cgi/libravatar.cgi
Drop unused my $vars
[debbugs.git] / cgi / libravatar.cgi
index c0ff013013220b4aa104c55696c1e870d93f0daa..33aa90a7d5b09c8a3d8296e77dbd93bf336983d0 100755 (executable)
@@ -6,16 +6,11 @@ use strict;
 use Debbugs::Config qw(:config);
 use Debbugs::CGI qw(cgi_parameters);
 use Debbugs::Common;
-use Digest::MD5 qw(md5_hex);
 use File::LibMagic;
-use File::Temp qw(tempfile);
 use Debbugs::Libravatar qw(:libravatar);
 
 use Libravatar::URL;
 
-use LWP::UserAgent;
-use HTTP::Request;
-
 use CGI::Simple;
 use Cwd qw(abs_path);
 
@@ -34,11 +29,9 @@ if ($param{avatar} ne 'yes' or not defined $param{email} or not length $param{em
     exit 0;
 }
 
-# figure out what the md5sum of the e-mail is.
-my $email_md5sum = md5_hex(lc($param{email}));
-my $cache_location = cache_location(email => lc($param{email}));
+my ($cache_location, $is_valid) = cache_location(email => lc($param{email}));
 # if we've got it, and it's less than one hour old, return it.
-if (cache_valid($cache_location)) {
+if ($is_valid) {
     serve_cache($cache_location,$q);
     exit 0;
 }