[Rt-commit] r6308 - in rt/branches/3.7-EXPERIMENTAL: .

ruz at bestpractical.com ruz at bestpractical.com
Fri Oct 27 01:39:30 EDT 2006


Author: ruz
Date: Fri Oct 27 01:39:29 2006
New Revision: 6308

Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/lib/RT/Transaction_Overlay.pm

Log:
 r4046 at cubic-pc:  cubic | 2006-10-27 02:34:59 +0400
 * simplify sub
 * don't call self->Attachments->First twice


Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Transaction_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Transaction_Overlay.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Transaction_Overlay.pm	Fri Oct 27 01:39:29 2006
@@ -401,12 +401,8 @@
 
 sub Subject {
     my $self = shift;
-    if ( $self->Attachments->First ) {
-        return ( $self->Attachments->First->Subject );
-    }
-    else {
-        return (undef);
-    }
+    return undef unless my $first = $self->Attachments->First;
+    return $first->Subject;
 }
 
 # }}}


More information about the Rt-commit mailing list