X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy%2FTask.pm;h=434019825aadebcb8dee0ffa3146f67f2d492772;hb=87eef33eee0a92bf11aa4d4fcc061526f9176a50;hp=0cbce823e7075e45f7c52cba4cc4fab8703f33c8;hpb=ff1581c8d5c72238903702464704d9ba8584bab7;p=irspy-moved-to-github.git diff --git a/lib/ZOOM/IRSpy/Task.pm b/lib/ZOOM/IRSpy/Task.pm index 0cbce82..4340198 100644 --- a/lib/ZOOM/IRSpy/Task.pm +++ b/lib/ZOOM/IRSpy/Task.pm @@ -1,4 +1,4 @@ -# $Id: Task.pm,v 1.6 2007-05-09 11:30:53 mike Exp $ +# $Id: Task.pm,v 1.7 2007-08-01 15:11:03 mike Exp $ package ZOOM::IRSpy::Task; @@ -6,6 +6,8 @@ use 5.008; use strict; use warnings; +use Scalar::Util; + =head1 NAME ZOOM::IRSpy::Task - base class for tasks in IRSpy @@ -34,7 +36,7 @@ sub new { my $class = shift(); my($conn, $udata, $options, %cb) = @_; - return bless { + my $this = bless { irspy => $conn->{irspy}, conn => $conn, udata => $udata, @@ -42,6 +44,11 @@ sub new { cb => \%cb, timeRegistered => time(), }, $class; + + #Scalar::Util::weaken($this->{irspy}); + #Scalar::Util::weaken($this->{udata}); + + return $this; } @@ -89,7 +96,6 @@ sub set_options { 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} = $old;