[Rt-commit] r9231 - rt/branches/3.7-RTIR-RELENG/lib/RT
ruz at bestpractical.com
ruz at bestpractical.com
Sun Oct 7 20:33:30 EDT 2007
Author: ruz
Date: Sun Oct 7 20:33:27 2007
New Revision: 9231
Modified:
rt/branches/3.7-RTIR-RELENG/lib/RT/Record.pm
Log:
* 'no warnings...' instead of defaulting to empty string
Modified: rt/branches/3.7-RTIR-RELENG/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.7-RTIR-RELENG/lib/RT/Record.pm (original)
+++ rt/branches/3.7-RTIR-RELENG/lib/RT/Record.pm Sun Oct 7 20:33:27 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