From ff1581c8d5c72238903702464704d9ba8584bab7 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 9 May 2007 11:30:53 +0000 Subject: [PATCH] Correct support for persistent options. --- lib/ZOOM/IRSpy/Task.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ZOOM/IRSpy/Task.pm b/lib/ZOOM/IRSpy/Task.pm index 7e6baa2..0cbce82 100644 --- a/lib/ZOOM/IRSpy/Task.pm +++ b/lib/ZOOM/IRSpy/Task.pm @@ -1,4 +1,4 @@ -# $Id: Task.pm,v 1.5 2007-05-09 11:19:20 mike Exp $ +# $Id: Task.pm,v 1.6 2007-05-09 11:30:53 mike Exp $ package ZOOM::IRSpy::Task; @@ -87,11 +87,12 @@ sub set_options { $value = "" if !defined $value; $this->conn()->log("irspy_debug", "$this setting option '$key' -> ", defined $value ? "'$value'" : "undefined"); + my $old = $this->conn()->option($key, $value); if ($persistent) { print "deleting '*$key'
\n"; delete $this->{options}->{"*$key"} } else { - $this->{options}->{$key} = $this->conn()->option($key, $value); + $this->{options}->{$key} = $old; } } } -- 1.7.10.4