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

ruz at bestpractical.com ruz at bestpractical.com
Mon Oct 8 12:31:03 EDT 2007


Author: ruz
Date: Mon Oct  8 12:31:01 2007
New Revision: 9244

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

Log:
 r9232 at cubic-pc (orig r9231):  ruz | 2007-10-08 04:33:27 +0400
 * 'no warnings...' instead of defaulting to empty string


Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Record.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Record.pm	Mon Oct  8 12:31:01 2007
@@ -887,11 +887,13 @@
         # This is in an eval block because $object might not exist.
         # and might not have a Name method. But "can" won't find autoloaded
         # items. If it fails, we don't care
-        eval {
-            my $object = $attribute . "Obj";
-            next if ($self->$object->Name eq $value);
+        do { no warnings "uninitialized";
+            eval {
+                my $object = $attribute . "Obj";
+                next if $self->$object->Name eq $value;
+            };
+            next if $value eq $self->$attribute();
         };
-        next if ( $value eq ( $self->$attribute() || '' ) );
         my $method = "Set$attribute";
         my ( $code, $msg ) = $self->$method($value);
         my ($prefix) = ref($self) =~ /RT(?:.*)::(\w+)/;


More information about the Rt-commit mailing list