From 9ff3c552b819fc065bf963639bbd72b427b58dd9 Mon Sep 17 00:00:00 2001 From: ribet Date: Thu, 30 Aug 2007 15:02:58 +0000 Subject: Rétablissement du code d'origine. Reste à voir s'il faut remettre l'argument ref à la fonction tget. --- src/MTools.pm | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/MTools.pm b/src/MTools.pm index 30698d2..4b24c74 100644 --- a/src/MTools.pm +++ b/src/MTools.pm @@ -155,10 +155,7 @@ my $link_token = 0; sub __configure { my ($obj, $sender, $key, $value) = @_; my $obj_instance = ref ($obj) eq '' ? $obj : $obj -> {instance}; - - my $obj_i = ""; - $obj_i = "$obj_instance" if defined $obj_instance; - if ($obj_i ne "$obj") + if ($obj_instance ne $obj) { my $oldvalue = $obj -> {__properties} -> {$key} -> {val}; $obj -> {__properties} -> {$key} -> {val} = $value; @@ -188,9 +185,7 @@ sub __confproplink { my ($sender, $obj, $key, $val) = @_; my $obj_instance = ref ($obj) eq '' ? $obj : $obj -> {instance}; - my $obj_i = ""; - $obj_i = "$obj_instance" if defined $obj_instance; - if ($obj_i ne "$obj") + if ($obj_instance ne $obj) { if ($obj -> {__properties} -> {$key} -> {link_token} != $link_token) { @@ -222,9 +217,7 @@ sub __confproplink { sub propertyExists { my ($obj, $key) = @_; my $obj_instance = ref ($obj) eq '' ? $obj : $obj -> {instance}; - my $obj_i = ""; - $obj_i = "$obj_instance" if defined $obj_instance; - if ($obj_i ne "$obj") + if ($obj_instance ne $obj) { if (exists $obj -> {__properties} -> {$key}) { @@ -238,9 +231,7 @@ sub mconfigure { my ($obj, %options) = @_; my $obj_instance = ref ($obj) eq '' ? $obj : $obj -> {instance}; my %zinc_props = (); - my $obj_i = ""; - $obj_i = "$obj_instance" if defined $obj_instance; - if ($obj_i ne "$obj") + if ($obj_instance ne $obj) { while ( my ($key, $val) = each (%options) ) { -- cgit v1.1