aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorribet2007-08-30 15:02:58 +0000
committerribet2007-08-30 15:02:58 +0000
commit9ff3c552b819fc065bf963639bbd72b427b58dd9 (patch)
tree19229f99fe2c2ca240a30a27b1ea045af3dba92b
parentbf3fdb737165ed6c7efba471a3784134e9a694c4 (diff)
downloadmtc-9ff3c552b819fc065bf963639bbd72b427b58dd9.zip
mtc-9ff3c552b819fc065bf963639bbd72b427b58dd9.tar.gz
mtc-9ff3c552b819fc065bf963639bbd72b427b58dd9.tar.bz2
mtc-9ff3c552b819fc065bf963639bbd72b427b58dd9.tar.xz
Rétablissement du code d'origine. Reste à voir s'il faut remettre l'argument ref à la fonction tget.
-rw-r--r--src/MTools.pm17
1 files 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) )
{