vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r22973: 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 09:39:35 UTC (rev 22972)
+++ trunk/cgi-bin/LJ/MemCacheProxy.pm	2012-09-26 11:17:58 UTC (rev 22973)
@@ -14,9 +14,8 @@
 sub get {
     my ($key_origin) = @_;
 
-    my $key = $key_origin->[1]
-        if ref $key_origin eq 'ARRAY';
-    
+    my $key = ref $key_origin eq 'ARRAY' ? $key_origin->[1] : $key_origin;
+
     if (exists $singletons{$key}) {
         return $singletons{$key};
     }

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