vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r22974: LJSUP-13786: get rid of warnings in LJ::...

Committer: vad
LJSUP-13786: get rid of warnings in LJ::MemCacheProxy
U   trunk/cgi-bin/LJ/MemCacheProxy.pm
Modified: trunk/cgi-bin/LJ/MemCacheProxy.pm
===================================================================
--- trunk/cgi-bin/LJ/MemCacheProxy.pm	2012-09-26 11:17:58 UTC (rev 22973)
+++ trunk/cgi-bin/LJ/MemCacheProxy.pm	2012-09-26 11:33:20 UTC (rev 22974)
@@ -65,8 +65,7 @@
 sub set {
     my ($key_origin, $value, $expire) = @_;
 
-    my $key = $key_origin->[1]
-        if ref $key_origin eq 'ARRAY';
+    my $key = ref $key_origin eq 'ARRAY' ? $key_origin->[1] : $key_origin;
 
     $singletons{$key} = $value;
     return LJ::MemCache::set($key_origin, $value, $expire);

Tags: livejournal, pm, vad, vadvs
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments