From: Mike Taylor Date: Thu, 12 Oct 2006 14:36:34 +0000 (+0000) Subject: Constructor takes new $udata argument. X-Git-Tag: CPAN-v1.02~981 X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=commitdiff_plain;h=eacb90caa099b3a6089b0fbd159cab46d5681f3b;hp=78ebddb108c860c67303b60d8361af87563a0d06;p=irspy-moved-to-github.git Constructor takes new $udata argument. New udata() method returns it. --- diff --git a/lib/ZOOM/IRSpy/Task.pm b/lib/ZOOM/IRSpy/Task.pm index 04d5a3c..e39e184 100644 --- a/lib/ZOOM/IRSpy/Task.pm +++ b/lib/ZOOM/IRSpy/Task.pm @@ -1,4 +1,4 @@ -# $Id: Task.pm,v 1.1 2006-10-06 11:33:07 mike Exp $ +# $Id: Task.pm,v 1.2 2006-10-12 14:36:34 mike Exp $ package ZOOM::IRSpy::Task; @@ -32,12 +32,13 @@ pointer to the next task to be performed after this. sub new { my $class = shift(); - my($conn, %cb) = @_; + my($conn, $udata, %cb) = @_; return bless { irspy => $conn->{irspy}, conn => $conn, cb => \%cb, + udata => $udata, timeRegistered => time(), }, $class; } @@ -53,6 +54,11 @@ sub conn { return $this->{conn}; } +sub udata { + my $this = shift(); + return $this->{udata}; +} + sub run { my $this = shift(); die "can't run base-class task $this";