1 # $Id: Task.pm,v 1.2 2006-10-12 14:36:34 mike Exp $
3 package ZOOM::IRSpy::Task;
11 ZOOM::IRSpy::Task - base class for tasks in IRSpy
15 use ZOOM::IRSpy::Task;
16 package ZOOM::IRSpy::Task::SomeTask;
17 our @ISA = qw(ZOOM::IRSpy::Task);
18 # ... override methods
22 This class provides a base-class from which individual IRSpy task
23 classes can be derived. For example, C<ZOOM::IRSpy::Task::Search>
24 will represent a searching task, carrying with it a query, a pointer
27 The base class provides nothing more exciting than a link to a
28 callback function to be called when the task is complete, and a
29 pointer to the next task to be performed after this.
35 my($conn, $udata, %cb) = @_;
38 irspy => $conn->{irspy},
42 timeRegistered => time(),
49 return $this->{irspy};
59 return $this->{udata};
64 die "can't run base-class task $this";
69 return "[base-class] " . ref($this);
72 use overload '""' => \&render;
81 Mike Taylor, E<lt>mike@indexdata.comE<gt>
83 =head1 COPYRIGHT AND LICENSE
85 Copyright (C) 2006 by Index Data ApS.
87 This library is free software; you can redistribute it and/or modify
88 it under the same terms as Perl itself, either Perl version 5.8.7 or,
89 at your option, any later version of Perl 5 you may have available.